C# Class TypeScript4WebMatrix.DelegateCommand

Simple implementation of the DelegateCommand (aka RelayCommand) pattern.
Inheritance: ICommand
Afficher le fichier Open project: MacawNL/TypeScript4WebMatrix

Méthodes publiques

Méthode 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 méthode

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

DelegateCommand() public méthode

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

DelegateCommand() public méthode

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.
Résultat System

Execute() public méthode

Executes the command.
public Execute ( object parameter ) : void
parameter object Data used by the command.
Résultat void

OnCanExecuteChanged() public méthode

Invokes the CanExecuteChanged event.
public OnCanExecuteChanged ( ) : void
Résultat void