internal Parser(ParserSettings settings) { Settings = settings; Settings.Consumed = true; }
private static StatePair <IEnumerable <Token> > Tokenize(IEnumerable <string> arguments, IEnumerable <OptionSpecification> optionSpecs, ParserSettings settings) { return(settings.EnableDashDash ? Tokenizer.PreprocessDashDash( arguments, args => Tokenizer.Tokenize(args, name => NameLookup.Contains(name, optionSpecs, settings.NameComparer))) : Tokenizer.Tokenize(arguments, name => NameLookup.Contains(name, optionSpecs, settings.NameComparer))); }
/// <summary> /// Initializes a new instance of the <see cref="CommandLine.Parser" /> class. /// </summary> public Parser() { Settings = new ParserSettings { Consumed = true }; }
private static ParserResult <T> MakeParserResult <T>(Func <ParserResult <T> > parseFunc, ParserSettings settings) { return(DisplayHelp( HandleUnknownArguments( parseFunc(), settings.IgnoreUnknownArguments), settings.HelpWriter)); }