Exemplo n.º 1
0
 public static ParserResult <object> Choose(
     IEnumerable <Type> types,
     IEnumerable <string> arguments,
     StringComparer nameComparer,
     CultureInfo parsingCulture)
 {
     return(InstanceChooser.Choose(
                (args, optionSpecs) => Tokenizer.Tokenize(args, name => NameLookup.Contains(name, optionSpecs, nameComparer)),
                types,
                arguments,
                nameComparer,
                parsingCulture));
 }
Exemplo n.º 2
0
 public static ParserResult <T> Build <T>(
     Func <T> factory,
     IEnumerable <string> arguments,
     StringComparer nameComparer,
     CultureInfo parsingCulture)
 {
     return(InstanceBuilder.Build(
                factory,
                (args, optionSpecs) =>
                Tokenizer.Tokenize(args, name => NameLookup.Contains(name, optionSpecs, nameComparer)),
                arguments,
                nameComparer,
                parsingCulture));
 }