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

SetQuotedStringLiteralHighlight() public method

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

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