C# Class PowerArgs.Cli.ContextAssistSearchResult

A class that represents a search result that can be selected by the ContextAssistSearch context assist provider.
Show file Open project: adamabdelhamed/PowerArgs Class Usage Examples

Public Methods

Method Description
FromConsoleString ( ConsoleString stringValue ) : ContextAssistSearchResult

Creates a string result where the display text and value are the same object.

FromObject ( object value, ConsoleString displayText ) : ContextAssistSearchResult

Creates a search result from an object, given an optional display value.

FromObject ( object value, string displayText = null ) : ContextAssistSearchResult

Creates a search result from an object, given an optional display value.

FromString ( string stringValue ) : ContextAssistSearchResult

Creates a string result where the display text and value are the same object.

Private Methods

Method Description
ContextAssistSearchResult ( object value, ConsoleString displayText ) : System

Method Details

FromConsoleString() public static method

Creates a string result where the display text and value are the same object.
public static FromConsoleString ( ConsoleString stringValue ) : ContextAssistSearchResult
stringValue ConsoleString the result string
return ContextAssistSearchResult

FromObject() public static method

Creates a search result from an object, given an optional display value.
public static FromObject ( object value, ConsoleString displayText ) : ContextAssistSearchResult
value object The object to use as a result.
displayText ConsoleString The display text for the result. If null, the value's ToString() method will be called
return ContextAssistSearchResult

FromObject() public static method

Creates a search result from an object, given an optional display value.
public static FromObject ( object value, string displayText = null ) : ContextAssistSearchResult
value object The object to use as a result.
displayText string The display text for the result. If null, the value's ToString() method will be called
return ContextAssistSearchResult

FromString() public static method

Creates a string result where the display text and value are the same object.
public static FromString ( string stringValue ) : ContextAssistSearchResult
stringValue string the result string
return ContextAssistSearchResult