CommandLineParserT Constructor

Initializes a new instance of the CommandLineParser class using the specified options.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 3.1.1
C#
public CommandLineParser(
	ParseOptions? options = null
)

Parameters

options  ParseOptions  (Optional)
The options that control parsing behavior, or to use the default options.

Remarks

If the options parameter is not , the instance passed in will be modified to reflect the options from the arguments class's ParseOptionsAttribute attribute, if it has one.

Certain properties of the ParseOptions class can be changed after the CommandLineParser class has been constructed, and still affect the parsing behavior. See the Options property for details.

Some of the properties of the ParseOptions class, like anything related to error output, are only used by the static ParseT(ParseOptions) class and are not used here.

Exceptions

NotSupportedException The CommandLineParser cannot use type T as the command line arguments type, because it violates one of the rules concerning argument names or positions, or has an argument type that cannot be parsed.

See Also