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