// Copyright 2005-2015 Giacomo Stelluti Scala & Contributors. All rights reserved. See License.md in the project root for license information. using System; using System.Collections.Generic; namespace CommandLine { /// /// Defines generic overloads for . /// public static class ParserExtensions { /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// The type of the sixth verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// The type of the sixth verb. /// The type of the seventh verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// The type of the sixth verb. /// The type of the seventh verb. /// The type of the eighth verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// The type of the sixth verb. /// The type of the seventh verb. /// The type of the eighth verb. /// The type of the ninth verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// The type of the sixth verb. /// The type of the seventh verb. /// The type of the eighth verb. /// The type of the ninth verb. /// The type of the tenth verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// The type of the sixth verb. /// The type of the seventh verb. /// The type of the eighth verb. /// The type of the ninth verb. /// The type of the tenth verb. /// The type of the eleventh verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// The type of the sixth verb. /// The type of the seventh verb. /// The type of the eighth verb. /// The type of the ninth verb. /// The type of the tenth verb. /// The type of the eleventh verb. /// The type of the twelfth verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// The type of the sixth verb. /// The type of the seventh verb. /// The type of the eighth verb. /// The type of the ninth verb. /// The type of the tenth verb. /// The type of the eleventh verb. /// The type of the twelfth verb. /// The type of the thirteenth verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// The type of the sixth verb. /// The type of the seventh verb. /// The type of the eighth verb. /// The type of the ninth verb. /// The type of the tenth verb. /// The type of the eleventh verb. /// The type of the twelfth verb. /// The type of the thirteenth verb. /// The type of the fourteenth verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// The type of the sixth verb. /// The type of the seventh verb. /// The type of the eighth verb. /// The type of the ninth verb. /// The type of the tenth verb. /// The type of the eleventh verb. /// The type of the twelfth verb. /// The type of the thirteenth verb. /// The type of the fourteenth verb. /// The type of the fifteenth verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14), typeof(T15) }); } /// /// Parses a string array of command line arguments for verb commands scenario, constructing the proper instance from types as generic arguments. /// Grammar rules are defined decorating public properties with appropriate attributes. /// The must be applied to types in the array. /// /// The type of the first verb. /// The type of the second verb. /// The type of the third verb. /// The type of the fourth verb. /// The type of the fifth verb. /// The type of the sixth verb. /// The type of the seventh verb. /// The type of the eighth verb. /// The type of the ninth verb. /// The type of the tenth verb. /// The type of the eleventh verb. /// The type of the twelfth verb. /// The type of the thirteenth verb. /// The type of the fourteenth verb. /// The type of the fifteenth verb. /// The type of the sixteenth verb. /// A instance. /// A array of command line arguments, normally supplied by application entry point. /// A containing the appropriate instance with parsed values as a /// and a sequence of . /// Thrown if one or more arguments are null. /// All types must expose a parameterless constructor. public static ParserResult ParseArguments(this Parser parser, IEnumerable args) { if (parser == null) throw new ArgumentNullException("parser"); return parser.ParseArguments(args, new[] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14), typeof(T15), typeof(T16) }); } } }