C# Класс PowerArgs.Cli.KeywordHighlighter

A highlighter that is used to highlight a specific keyword
Наследование: FixedHighlightTokenHighlighter
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
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