C# 클래스 PowerArgs.Cli.RichCommandLineContext

A class that provides context for consumers of the RichTextCommandLineReader
파일 보기 프로젝트 열기: adamabdelhamed/PowerArgs 1 사용 예제들

Private Properties

프로퍼티 타입 설명
GetQuoteStatus QuoteStatus
IsCursorOnToken bool
Reset void
RichCommandLineContext System

공개 메소드들

메소드 설명
ClearConsole ( ) : void

Clears the console

CompleteCurrentToken ( Token currentToken, ConsoleString completion ) : void

Performs an auto complete of the given token.

GetBufferSubstringFromToken ( Token t ) : ConsoleString

Returns the portion of the buffer represented by the given token

RefreshConsole ( int leftAdjust, int topAdjust ) : void

Rewrites the console using the latest values in the Buffer, preserving the cursor position with an optional adjustment.

RefreshTokenInfo ( bool force = false ) : void

Runs the tokenizer if it hasn't already been run on the current key press. You can pass a force flag if you want to force the tokenizer to run. You would need to do this only if you've manually changed the buffer within your handler.

ReplaceConsole ( ConsoleString newBuffer ) : void

Rewrites the console using the latest values in the Buffer and moves the cursor to the end of the line.

WriteCharacterForPressedKey ( ) : void

Takes the value of KeyPressed.KeyChar and writes it to the console in the current buffer position.

비공개 메소드들

메소드 설명
GetQuoteStatus ( List chars, int startPosition ) : QuoteStatus
IsCursorOnToken ( Token t ) : bool
Reset ( ) : void
RichCommandLineContext ( ConsoleHistoryManager historyManager ) : System

메소드 상세

ClearConsole() 공개 메소드

Clears the console
public ClearConsole ( ) : void
리턴 void

CompleteCurrentToken() 공개 메소드

Performs an auto complete of the given token.
public CompleteCurrentToken ( Token currentToken, ConsoleString completion ) : void
currentToken Token the token to complete
completion ConsoleString the completed token. Note that it is not required that the completion string starts with the current token value, though it usually does.
리턴 void

GetBufferSubstringFromToken() 공개 메소드

Returns the portion of the buffer represented by the given token
public GetBufferSubstringFromToken ( Token t ) : ConsoleString
t Token the token whose position to use to look into the buffer
리턴 ConsoleString

RefreshConsole() 공개 메소드

Rewrites the console using the latest values in the Buffer, preserving the cursor position with an optional adjustment.
public RefreshConsole ( int leftAdjust, int topAdjust ) : void
leftAdjust int Adjusts the left cursor position by the desired amound. If you want the cursor to stay where it was then use 0.
topAdjust int Adjusts the top cursor position by the desired amound. If you want the cursor to stay where it was then use 0.
리턴 void

RefreshTokenInfo() 공개 메소드

Runs the tokenizer if it hasn't already been run on the current key press. You can pass a force flag if you want to force the tokenizer to run. You would need to do this only if you've manually changed the buffer within your handler.
public RefreshTokenInfo ( bool force = false ) : void
force bool If true, then the tokenizer is run no matter what. If false, the tokenizer only runs if it hasn't yet run on this keystroke.
리턴 void

ReplaceConsole() 공개 메소드

Rewrites the console using the latest values in the Buffer and moves the cursor to the end of the line.
public ReplaceConsole ( ConsoleString newBuffer ) : void
newBuffer ConsoleString The new line of text that will replace the current buffer.
리턴 void

WriteCharacterForPressedKey() 공개 메소드

Takes the value of KeyPressed.KeyChar and writes it to the console in the current buffer position.
public WriteCharacterForPressedKey ( ) : void
리턴 void