CommandInfoCreateParser Method

Creates a CommandLineParser instance for the type indicated by the CommandType property.

Definition

Namespace: Ookii.CommandLine.Commands
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public abstract CommandLineParser CreateParser()

Return Value

CommandLineParser
A CommandLineParser instance for the CommandType.

Remarks

If the UseCustomArgumentParsing property is , the command cannot be created using the CommandLineParser class, and you must use the CreateInstanceWithCustomParsing method or CreateInstanceWithResult(ReadOnlyMemoryString) method instead.

Exceptions

InvalidOperationException The command uses the ICommandWithCustomParsing interface.

See Also