C# Class ProtectEyes.CommandHandler

Inheritance: ICommand
显示文件 Open project: qiuhaotc/ProtectEyes

Public Methods

Method Description
CanExecute ( object parameter ) : bool

Forcess checking if execute is allowed

CommandHandler ( Action action, Func canExecute ) : System

Creates instance of the command handler

Execute ( object parameter ) : void

Method Details

CanExecute() public method

Forcess checking if execute is allowed
public CanExecute ( object parameter ) : bool
parameter object
return bool

CommandHandler() public method

Creates instance of the command handler
public CommandHandler ( Action action, Func canExecute ) : System
action Action Action to be executed by the command
canExecute Func A bolean property to containing current permissions to execute the command
return System

Execute() public method

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