C# Class ActionCommand, arcgis-toolkit-dotnet

Very simple command that takes an System.Action with no parameters and invokes the System.Action when the ICommand.Execute(object) method is invoked.
Inheritance: ICommand
Afficher le fichier Open project: Esri/arcgis-toolkit-dotnet Class Usage Examples

Méthodes publiques

Méthode Description
ActionCommand ( Action executeAction, Func canExecuteFunction ) : System

Initializes a new instance of the ActionCommand class.

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.

RaiseCanExecute ( ) : void

Raises the can execute function

Method Details

ActionCommand() public méthode

Initializes a new instance of the ActionCommand class.
public ActionCommand ( Action executeAction, Func canExecuteFunction ) : System
executeAction Action The action to be performed on .
canExecuteFunction Func The fuction that will test if the action can be executed.
Résultat System

CanExecute() public méthode

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

Execute() public méthode

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

RaiseCanExecute() public méthode

Raises the can execute function
public RaiseCanExecute ( ) : void
Résultat void