C# Class AvalonStudio.Extensibility.Commands.CommandHandlerWrapper

Wraps a generic ICommandHandler<T> or ICommandListHandler<T> and allows easy calling of generic interface methods.
Show file Open project: VitalElement/AvalonStudio Class Usage Examples

Public Methods

Method Description
FromCommandHandler ( Type commandHandlerInterfaceType, object commandHandler ) : CommandHandlerWrapper
FromCommandListHandler ( Type commandHandlerInterfaceType, object commandListHandler ) : CommandHandlerWrapper
Populate ( Command command, List commands ) : void
Run ( Command command ) : System.Threading.Tasks.Task
Update ( Command command ) : void

Private Methods

Method Description
CommandHandlerWrapper ( object commandHandler, MethodInfo updateMethod, MethodInfo populateMethod, MethodInfo runMethod ) : System

Method Details

FromCommandHandler() public static method

public static FromCommandHandler ( Type commandHandlerInterfaceType, object commandHandler ) : CommandHandlerWrapper
commandHandlerInterfaceType System.Type
commandHandler object
return CommandHandlerWrapper

FromCommandListHandler() public static method

public static FromCommandListHandler ( Type commandHandlerInterfaceType, object commandListHandler ) : CommandHandlerWrapper
commandHandlerInterfaceType System.Type
commandListHandler object
return CommandHandlerWrapper

Populate() public method

public Populate ( Command command, List commands ) : void
command Command
commands List
return void

Run() public method

public Run ( Command command ) : System.Threading.Tasks.Task
command Command
return System.Threading.Tasks.Task

Update() public method

public Update ( Command command ) : void
command Command
return void