PowerArgs.Cli.KeywordHighlighter.ShouldBeHighlighted C# (CSharp) Method

ShouldBeHighlighted() public method

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
return bool
        public override bool ShouldBeHighlighted(RichCommandLineContext readerContext, HighlighterContext highlighterContext)
        {
            if (highlighterContext.IsLastToken) return false;
            return highlighterContext.CurrentToken.Value.Equals(keyword, comparison);
        }