C# Class Buddy.UI.Core.RelayCommand

Provides a default implementation for a simple command.
Inheritance: ICommand
ファイルを表示 Open project: BosslandGmbH/Buddy.UI

Public Methods

Method Description
CanExecute ( ) : bool

Determines whether this command can be executed.

CanExecute ( object parameter ) : bool

Determines whether this command can be executed.

Execute ( object parameter ) : void

Executes this command.

RelayCommand ( Action action ) : System

Initializes a new instance of the RelayCommand class.

RelayCommand ( Action action, Func canExecute ) : System

Initializes a new instance of the RelayCommand class.

Method Details

CanExecute() public method

Determines whether this command can be executed.
public CanExecute ( ) : bool
return bool

CanExecute() public method

Determines whether this command can be executed.
public CanExecute ( object parameter ) : bool
parameter object The parameter.
return bool

Execute() public method

Executes this command.
public Execute ( object parameter ) : void
parameter object The parameter.
return void

RelayCommand() public method

Initializes a new instance of the RelayCommand class.
public RelayCommand ( Action action ) : System
action Action The action to be invoked when this command is triggered.
return System

RelayCommand() public method

Initializes a new instance of the RelayCommand class.
public RelayCommand ( Action action, Func canExecute ) : System
action Action The action to be invoked when this command is triggered.
canExecute Func Precondition determining whether this command can be executed or not.
return System