IParserProviderTSelfCreateParser Method

Creates a CommandLineParserT instance using the specified options.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
CommandLineParser<TSelf> CreateParser(
	ParseOptions? options = null
)

Parameters

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

Return Value

CommandLineParserTSelf
An instance of the CommandLineParserT class for the type TSelf.

Remarks

This method is typically generated for a class that defines command line arguments by the GeneratedParserAttribute attribute.

Exceptions

NotSupportedException The CommandLineParserT cannot use type TSelf as the command line arguments type, because it violates one of the rules concerning argument names or positions. Even when the parser was generated using the GeneratedParserAttribute class, not all those rules can be checked at compile time.

See Also