C# Class TypeScript4WebMatrix.DelegateCommand

Simple implementation of the DelegateCommand (aka RelayCommand) pattern.
Inheritance: ICommand
ファイルを表示 Open project: MacawNL/TypeScript4WebMatrix

Public Methods

Method Description
CanExecute ( object parameter ) : bool

Determines if the command can execute.

DelegateCommand ( Action execute ) : System

Initializes a new instance of the DelegateCommand class.

DelegateCommand ( bool>.Func canExecute, Action execute ) : System

Initializes a new instance of the DelegateCommand class.

Execute ( object parameter ) : void

Executes the command.

OnCanExecuteChanged ( ) : void

Invokes the CanExecuteChanged event.

Method Details

CanExecute() public method

Determines if the command can execute.
public CanExecute ( object parameter ) : bool
parameter object Data used by the command.
return bool

DelegateCommand() public method

Initializes a new instance of the DelegateCommand class.
public DelegateCommand ( Action execute ) : System
execute Action Action to invoke when Execute is called.
return System

DelegateCommand() public method

Initializes a new instance of the DelegateCommand class.
public DelegateCommand ( bool>.Func canExecute, Action execute ) : System
canExecute bool>.Func Func to invoke when CanExecute is called.
execute Action Action to invoke when Execute is called.
return System

Execute() public method

Executes the command.
public Execute ( object parameter ) : void
parameter object Data used by the command.
return void

OnCanExecuteChanged() public method

Invokes the CanExecuteChanged event.
public OnCanExecuteChanged ( ) : void
return void