ParseOptionsPrefixTermination Property

Gets or sets the behavior when an argument is encountered that consists of only the long argument prefix ("--" by default) by itself, not followed by a name.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public PrefixTerminationMode? PrefixTermination { get; set; }

Property Value

NullablePrefixTerminationMode
One of the values of the PrefixTerminationMode enumeration, or to use the value from the ParseOptionsAttribute attribute, or if that is not present, PrefixTerminationModeNone. The default value is .

Remarks

Use this property to allow the use of the long argument prefix by itself to either treat all remaining values as positional argument values, even when they start with an argument prefix, or to cancel parsing with CancelModeSuccess so the remaining values can be inspected using the ParseResultRemainingArguments property. This follows typical POSIX argument parsing conventions.

The value of the LongArgumentNamePrefix property is used to identify this special argument, even if the parsing mode is not ParsingModeLongShort.

If not , this property overrides the ParseOptionsAttributePrefixTermination property.

See Also