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

ShouldBeHighlighted() public method

Returns true if the current token is a numeric value, 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)
        {
            double numericValue;
            return double.TryParse(highlighterContext.CurrentToken.Value, out numericValue);
        }