ParseOptionsAttribute.PrefixTermination 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: 5.0.0+724ca9b7fa5edc075ec2ae65044e61b0d494fd1c
C#
public PrefixTerminationMode PrefixTermination { get; set; }

Property Value

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

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 CancelMode.Success so the remaining values can be inspected using the ParseResult.RemainingArguments 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 ParsingMode.LongShort.

This value can be overridden by the ParseOptions.PrefixTermination property.

See Also