C# Class RoverOperator.CommandBase

The base implementation of a command.
Inheritance: ICommand
显示文件 Open project: jpadillak/Concordia_Capstone2013-14

Public Methods

Method Description
CanExecute ( object parameter ) : bool

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

Execute ( object parameter ) : void

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

OnCanExecuteChanged ( ) : void

Raises the CanExecuteChanged event.

Protected Methods

Method Description
OnExecute ( object parameter ) : void

Executes the command.

Method Details

CanExecute() public method

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.
return bool

Execute() public method

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.
return void

OnCanExecuteChanged() public method

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

OnExecute() protected abstract method

Executes the command.
protected abstract OnExecute ( object parameter ) : void
parameter object The parameter.
return void