C# Class PowerArgs.Cli.ContextAssistPicker

A context assist provider that lets the user select from a fixed set of options
Inheritance: ContextAssistSearch
Show file Open project: adamabdelhamed/PowerArgs Class Usage Examples

Public Methods

Method Description
CanAssist ( RichCommandLineContext context ) : bool

Returns true if there is at least one option, false otherwise.

ContextAssistPicker ( ) : System

initialized the picker

Pick ( IConsoleProvider console = null, bool allowCancel = true ) : ContextAssistSearchResult

Lets the user pick from the set of options.

Protected Methods

Method Description
GetResults ( string searchString ) : List

returns all options that contain the given search string, ignoring case

GetResultsAsync ( string searchString ) : System.Threading.Tasks.Task>

Not implemented

Method Details

CanAssist() public method

Returns true if there is at least one option, false otherwise.
public CanAssist ( RichCommandLineContext context ) : bool
context RichCommandLineContext context about the parent reader
return bool

ContextAssistPicker() public method

initialized the picker
public ContextAssistPicker ( ) : System
return System

GetResults() protected method

returns all options that contain the given search string, ignoring case
protected GetResults ( string searchString ) : List
searchString string the search string
return List

GetResultsAsync() protected method

Not implemented
protected GetResultsAsync ( string searchString ) : System.Threading.Tasks.Task>
searchString string Not implemented
return System.Threading.Tasks.Task>

Pick() public method

Lets the user pick from the set of options.
public Pick ( IConsoleProvider console = null, bool allowCancel = true ) : ContextAssistSearchResult
console IConsoleProvider optionally provide a custom console implementation
allowCancel bool if true, users can cancel picking by pressing the escape key. If false, the escape key does nothing.
return ContextAssistSearchResult