C# Class PowerArgs.Cli.KeyHandler

A class that lets you dynamically create key handlers
Inheritance: IKeyHandler
Show file Open project: adamabdelhamed/PowerArgs

Public Methods

Method Description
FromAction ( Action handler ) : IKeyHandler

Creates a key handler from the given action

Handle ( RichCommandLineContext context ) : void

Calls the handler action code

Private Methods

Method Description
KeyHandler ( IEnumerable keys, Action handler ) : System

Method Details

FromAction() public static method

Creates a key handler from the given action
public static FromAction ( Action handler ) : IKeyHandler
handler Action the handler action code
return IKeyHandler

Handle() public method

Calls the handler action code
public Handle ( RichCommandLineContext context ) : void
context RichCommandLineContext context from the parent reader
return void