PowerArgs.Cli.SimpleSyntaxHighlighter.SetNumericHighlight C# (CSharp) Method

SetNumericHighlight() public method

Lets you control how numeric values should be highlighted
public SetNumericHighlight ( ConsoleColor fg = null, ConsoleColor bg = null ) : void
fg ConsoleColor The foreground highlight color
bg ConsoleColor The background highlight color
return void
        public void SetNumericHighlight(ConsoleColor? fg = null, ConsoleColor? bg = null)
        {
            var existing = (from h in TokenHighlighters where h is NumericHighlighter select h).FirstOrDefault();
            if (existing != null)
            {
                TokenHighlighters.Remove(existing);
            }

            TokenHighlighters.Add(new NumericHighlighter(fg, bg));
        }