C# Class GoogleCloudExtension.Utils.ProtectedCommand

This class implements the ICommand interface and wraps the action for the command in ErrorHandlerUtils.HandleExceptions(Action) to handle the exceptions that could escape.
Inheritance: ICommand
ファイルを表示 Open project: GoogleCloudPlatform/google-cloud-visualstudio Class Usage Examples

Public Methods

Method Description
CanExecute ( object parameter ) : bool
Execute ( object parameter ) : void
ProtectedCommand ( System.Action handler, bool canExecuteCommand = true ) : System

Initializes a new instance of ProtectedCommand.

Method Details

CanExecute() public method

public CanExecute ( object parameter ) : bool
parameter object
return bool

Execute() public method

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

ProtectedCommand() public method

Initializes a new instance of ProtectedCommand.
public ProtectedCommand ( System.Action handler, bool canExecuteCommand = true ) : System
handler System.Action The action to execute when the command is executed.
canExecuteCommand bool Whether the command is enabled or not.
return System