C# 클래스 PowerArgs.Cli.KeywordHighlighter

A highlighter that is used to highlight a specific keyword
상속: FixedHighlightTokenHighlighter
파일 보기 프로젝트 열기: adamabdelhamed/PowerArgs

보호된 프로퍼티들

프로퍼티 타입 설명
keyword string

공개 메소드들

메소드 설명
KeywordHighlighter ( string keyword, ConsoleColor fg = null, ConsoleColor bg = null, System.StringComparison comparison = StringComparison.InvariantCulture ) : System

Creates the highlighter.

ShouldBeHighlighted ( RichCommandLineContext readerContext, HighlighterContext highlighterContext ) : bool

Returns true if the keyword is matched, false otherwise

메소드 상세

KeywordHighlighter() 공개 메소드

Creates the highlighter.
public KeywordHighlighter ( string keyword, ConsoleColor fg = null, ConsoleColor bg = null, System.StringComparison comparison = StringComparison.InvariantCulture ) : System
keyword string The keyword to highlight whenever it is found
fg ConsoleColor The foreground color of this highlighter. If null, the console default is used.
bg ConsoleColor The background color of this highlighter. If null, the console default is used.
comparison System.StringComparison determines how strings are compared. By default the comparison is case sensitive
리턴 System

ShouldBeHighlighted() 공개 메소드

Returns true if the keyword is matched, false otherwise
public ShouldBeHighlighted ( RichCommandLineContext readerContext, HighlighterContext highlighterContext ) : bool
readerContext RichCommandLineContext context from the reader
highlighterContext HighlighterContext context about the current token
리턴 bool

프로퍼티 상세

keyword 보호되어 있는 프로퍼티

The keyword to highlight whenever it is found
protected string keyword
리턴 string