C# 클래스 PowerArgs.Cli.RichTextCommandLineReader

A utility that lets you prompt a console user for input in an interactive way. It provides hooks for tab completion, syntax highlighting, history management via the up and down arrows, etc.
파일 보기 프로젝트 열기: adamabdelhamed/PowerArgs 1 사용 예제들

Private Properties

프로퍼티 타입 설명
DoSyntaxHighlighting void

공개 메소드들

메소드 설명
IsWriteable ( ConsoleKeyInfo info ) : bool

Determines if the given key is writable text

ReadCommandLine ( ConsoleString initialBuffer = null ) : string[]

Reads a line of text from the console and converts it into a string array that has accounted for escape sequences and quoted string literals.

ReadLine ( ConsoleString initialBuffer = null ) : ConsoleString

Reads a line of text from the console. Any interactions you've configured before calling this method will be in effect.

RegisterHandler ( IKeyHandler handler ) : void

Lets you register a custom key handler. You are responsible for ensuring that each key is only handled by one handler. This method will throw if you try to add a duplicate key handler.

RichTextCommandLineReader ( ) : System

Creates a new reader.

UnregisterHandler ( ConsoleKey key ) : bool

Unregisters the handler for the given key

UnregisterHandler ( IKeyHandler handler ) : void

Unregisters the given key handler from the reader. You should only do this if you're planning on overriding the default handlers, and you should do so with caution.

비공개 메소드들

메소드 설명
DoSyntaxHighlighting ( RichCommandLineContext context ) : void

메소드 상세

IsWriteable() 공개 정적인 메소드

Determines if the given key is writable text
public static IsWriteable ( ConsoleKeyInfo info ) : bool
info System.ConsoleKeyInfo the key info
리턴 bool

ReadCommandLine() 공개 메소드

Reads a line of text from the console and converts it into a string array that has accounted for escape sequences and quoted string literals.
public ReadCommandLine ( ConsoleString initialBuffer = null ) : string[]
initialBuffer ConsoleString Optionally seed the prompt with an initial value that the end user can modify
리턴 string[]

ReadLine() 공개 메소드

Reads a line of text from the console. Any interactions you've configured before calling this method will be in effect.
public ReadLine ( ConsoleString initialBuffer = null ) : ConsoleString
initialBuffer ConsoleString Optionally seed the prompt with an initial value that the end user can modify
리턴 ConsoleString

RegisterHandler() 공개 메소드

Lets you register a custom key handler. You are responsible for ensuring that each key is only handled by one handler. This method will throw if you try to add a duplicate key handler.
public RegisterHandler ( IKeyHandler handler ) : void
handler IKeyHandler The handler to register
리턴 void

RichTextCommandLineReader() 공개 메소드

Creates a new reader.
public RichTextCommandLineReader ( ) : System
리턴 System

UnregisterHandler() 공개 메소드

Unregisters the handler for the given key
public UnregisterHandler ( ConsoleKey key ) : bool
key ConsoleKey the key to unregister
리턴 bool

UnregisterHandler() 공개 메소드

Unregisters the given key handler from the reader. You should only do this if you're planning on overriding the default handlers, and you should do so with caution.
public UnregisterHandler ( IKeyHandler handler ) : void
handler IKeyHandler The handler to unregister
리턴 void