C# Class Mckineap.Utilities.RelayCommand

Inheritance: ICommand
Show file Open project: loic-lavergne/mckineap Class Usage Examples

Public Methods

Method Description
CanExecute ( object parameter ) : bool
Destroy ( ) : void
Execute ( object parameter ) : void
OnCanExecuteChanged ( ) : void
RelayCommand ( Action execute ) : System

Creates a new command of type T that can always execute

RelayCommand ( Action execute, Predicate canExecute ) : System

Creates a new command of type T with conditional execution

Private Methods

Method Description
DefaultCanExecute ( object parameter ) : bool

Method Details

CanExecute() public method

public CanExecute ( object parameter ) : bool
parameter object
return bool

Destroy() public method

public Destroy ( ) : void
return void

Execute() public method

public Execute ( object parameter ) : void
parameter object
return void

OnCanExecuteChanged() public method

public OnCanExecuteChanged ( ) : void
return void

RelayCommand() public method

Creates a new command of type T that can always execute
public RelayCommand ( Action execute ) : System
execute Action The execute logic
return System

RelayCommand() public method

Creates a new command of type T with conditional execution
public RelayCommand ( Action execute, Predicate canExecute ) : System
execute Action The execute logic
canExecute Predicate The execute status logic
return System