C# Class PowerArgs.Cli.ContextAssistResult

A class that represents a result that an IContentAssistProvider returns to a parent reader.
Show file Open project: adamabdelhamed/PowerArgs Class Usage Examples

Public Properties

Property Type Description
Cancel ContextAssistResult
NoOp ContextAssistResult

Public Methods

Method Description
CreateCustomResult ( List newBuffer, int consoleRefreshLeftOffset ) : ContextAssistResult

Creates a custom result that manually replaces the entire parent reader's buffer.

CreateInsertResult ( RichCommandLineContext context, ConsoleString selection ) : ContextAssistResult

Creates a result that replaces the current token with the given selection.

Private Methods

Method Description
ContextAssistResult ( ) : System.Collections.Generic

Method Details

CreateCustomResult() public static method

Creates a custom result that manually replaces the entire parent reader's buffer.
public static CreateCustomResult ( List newBuffer, int consoleRefreshLeftOffset ) : ContextAssistResult
newBuffer List the new buffer to apply to the parent reader
consoleRefreshLeftOffset int The relative offset to apply to the current cursor position
return ContextAssistResult

CreateInsertResult() public static method

Creates a result that replaces the current token with the given selection.
public static CreateInsertResult ( RichCommandLineContext context, ConsoleString selection ) : ContextAssistResult
context RichCommandLineContext Context from the parent reader
selection ConsoleString The selection string to insert
return ContextAssistResult

Property Details

Cancel public static property

A result that indicates that either the user or the system wants to stop the assist provider without making any changes to the parent reader
public static ContextAssistResult,PowerArgs.Cli Cancel
return ContextAssistResult

NoOp public static property

A result that indicates that no result is ready and that the assist provider should continue to accept keyboard input
public static ContextAssistResult,PowerArgs.Cli NoOp
return ContextAssistResult