Esempio n. 1
0
 internal Parser(ParserSettings settings)
 {
     Settings          = settings;
     Settings.Consumed = true;
 }
Esempio n. 2
0
 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)));
 }
Esempio n. 3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="CommandLine.Parser" /> class.
 /// </summary>
 public Parser()
 {
     Settings = new ParserSettings {
         Consumed = true
     };
 }
Esempio n. 4
0
 private static ParserResult <T> MakeParserResult <T>(Func <ParserResult <T> > parseFunc, ParserSettings settings)
 {
     return(DisplayHelp(
                HandleUnknownArguments(
                    parseFunc(),
                    settings.IgnoreUnknownArguments),
                settings.HelpWriter));
 }