C# Класс GeekyTool.Core.Commands.DelegateCommand

A command whose sole purpose is to relay its functionality to other objects by invoking delegates. The default return value for the CanExecute method is 'true'. This class does not allow you to accept command parameters in the Execute and CanExecute callback methods.
Наследование: ICommand
Показать файл Открыть проект

Открытые методы

Метод Описание
CanExecute ( object parameter ) : bool

Defines the method that determines whether the command can execute in its current state.

DelegateCommand ( System.Action exec ) : System

Initializes a new instance of the DelegateCommand class.

DelegateCommand ( System.Action exec, Func canExec ) : System

Initializes a new instance of the DelegateCommand class.

Execute ( object parameter ) : void

Defines the method to be called when the command is invoked.

RaiseCanExecuteChanged ( ) : void

Описание методов

CanExecute() публичный Метод

Defines the method that determines whether the command can execute in its current state.
public CanExecute ( object parameter ) : bool
parameter object Data used by the command. If the command does not require data to be passed, this object can be set to null.
Результат bool

DelegateCommand() публичный Метод

Initializes a new instance of the DelegateCommand class.
public DelegateCommand ( System.Action exec ) : System
exec System.Action The execute.
Результат System

DelegateCommand() публичный Метод

Initializes a new instance of the DelegateCommand class.
public DelegateCommand ( System.Action exec, Func canExec ) : System
exec System.Action The execute.
canExec Func The can execute.
Результат System

Execute() публичный Метод

Defines the method to be called when the command is invoked.
public Execute ( object parameter ) : void
parameter object Data used by the command. If the command does not require data to be passed, this object can be set to null.
Результат void

RaiseCanExecuteChanged() публичный Метод

public RaiseCanExecuteChanged ( ) : void
Результат void