C# 클래스 PowerArgs.Cli.ConditionalKeywordHighlighter

A keyword highlighter that highlights based on a condition
상속: KeywordHighlighter
파일 보기 프로젝트 열기: adamabdelhamed/PowerArgs

공개 메소드들

메소드 설명
ConditionalKeywordHighlighter ( string keyword, Func conditionEval, 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 token matches the keyword and the given conditional evaluation returns true

메소드 상세

ConditionalKeywordHighlighter() 공개 메소드

Creates the highlighter.
public ConditionalKeywordHighlighter ( string keyword, Func conditionEval, ConsoleColor fg = null, ConsoleColor bg = null, System.StringComparison comparison = StringComparison.InvariantCulture ) : System
keyword string The keyword to match
conditionEval Func The conditional match evaluation function
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 characters are compared
리턴 System

ShouldBeHighlighted() 공개 메소드

Returns true if the token matches the keyword and the given conditional evaluation returns true
public ShouldBeHighlighted ( RichCommandLineContext readerContext, HighlighterContext highlighterContext ) : bool
readerContext RichCommandLineContext context from the reader
highlighterContext HighlighterContext context about the current token
리턴 bool