CommandLineParser Constructor (Type, IEnumerableString) |
Namespace: Ookii.CommandLine
public CommandLineParser( Type argumentsType, IEnumerable<string>? argumentNamePrefixes )
Exception | Condition |
---|---|
ArgumentNullException | argumentsType is . |
ArgumentException | argumentNamePrefixes contains no elements or contains a or empty string value. |
NotSupportedException | The CommandLineParser cannot use argumentsType as the command line arguments type, because it defines a required postional argument after an optional positional argument, it defines a positional array argument that is not the last positional argument, it defines an argument with an invalid name, it defines two arguments with the same name, or it has two properties with the same Position property value. |
If you specify multiple argument name prefixes, the first one will be used when generating usage information using the WriteUsage(TextWriter, Int32, WriteUsageOptions) method.
This constructor uses the OrdinalIgnoreCase comparer for argument names.