ParseOptionsAttributePrefixTermination 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

PrefixTerminationMode
One of the values of the PrefixTerminationMode enumeration. The default value is PrefixTerminationModeNone.

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.

This value can be overridden by the ParseOptionsPrefixTermination property.

See Also