Click or drag to resize

ShellCommandAttributeCustomArgumentParsing Property

Gets or sets a value indicating whether the command does its own argument parsing.

Namespace:  Ookii.CommandLine
Assembly:  Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 2.3.0
Syntax
public bool CustomArgumentParsing { get; set; }

Property Value

Type: Boolean
if the command does its own argument parsing; otherwise, . The default value is .
Remarks

If this property is set to , the CreateShellCommand(Assembly, String, Int32) method and the RunShellCommand(Assembly, String, Int32) will not create the command with the CommandLineParser. Instead, the command type must define a constructor that takes three arguments: an array of String values that will contain the raw command line arguments, an Int32 that indicates the index of the first argument in the array after the command name, and a CreateShellCommandOptions instance specifying argument parsing and error handling options.

This constructor should not throw an exception is argument parsing fails. Instead, it should write error and usage information to the TextWriter instances specified by Error and Out.

If this property is set to and the shell command type does not have a constructor with those arguments, creating the command will fail.

See Also