C# Class GeekyTool.Core.Commands.DelegateCommandAsync

This class allows us to delegate command execution to viewmodels. This version of the command allow to use async/await.
Inheritance: ICommand
ファイルを表示 Open project: GeekyTheory/GeekyTool

Public Methods

Method Description
CanExecute ( object parameter ) : bool

This method is called from XAML to evaluate if the command can be executed.

DelegateCommandAsync ( Func execute ) : System

Constructor not using canExecute.

DelegateCommandAsync ( Func execute, Func canExecute ) : System

Constructor using both execute and canExecute.

Execute ( object parameter ) : void

This method is called from XAML to execute the command.

RaiseCanExecuteChanged ( ) : void

This method allow us to force the execution of CanExecute method to reevaluate execution.

Method Details

CanExecute() public method

This method is called from XAML to evaluate if the command can be executed.
public CanExecute ( object parameter ) : bool
parameter object
return bool

DelegateCommandAsync() public method

Constructor not using canExecute.
public DelegateCommandAsync ( Func execute ) : System
execute Func
return System

DelegateCommandAsync() public method

Constructor using both execute and canExecute.
public DelegateCommandAsync ( Func execute, Func canExecute ) : System
execute Func
canExecute Func
return System

Execute() public method

This method is called from XAML to execute the command.
public Execute ( object parameter ) : void
parameter object
return void

RaiseCanExecuteChanged() public method

This method allow us to force the execution of CanExecute method to reevaluate execution.
public RaiseCanExecuteChanged ( ) : void
return void