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

A highlighter that highlights based on a regular expression match
Наследование: FixedHighlightTokenHighlighter
Показать файл Открыть проект

Открытые методы

Метод Описание
RegexHighlighter ( string pattern, ConsoleColor fg = null, ConsoleColor bg = null ) : System

Creates the highlighter

ShouldBeHighlighted ( RichCommandLineContext readerContext, HighlighterContext highlighterContext ) : bool

Returns true if the regular expression is matched, false otherwise

Описание методов

RegexHighlighter() публичный Метод

Creates the highlighter
public RegexHighlighter ( string pattern, ConsoleColor fg = null, ConsoleColor bg = null ) : System
pattern string The regular expression pattern
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.
Результат System

ShouldBeHighlighted() публичный Метод

Returns true if the regular expression 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