CommandOptions.IsPosix Property

Gets or sets a value that indicates whether the options follow POSIX conventions.

Definition

Namespace: Ookii.CommandLine.Commands
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public override bool IsPosix { get; set; }

Property Value

Boolean
true if the options follow POSIX conventions; otherwise, false.

Remarks

This property is provided as a convenient way to set a number of related properties that together indicate the parser is using POSIX conventions. POSIX conventions in this case means that parsing uses long/short mode, argument and command names are case sensitive, and argument names, command names and value descriptions use dash-case (e.g. "command-name").

Setting this property to true is equivalent to setting the ParseOptions.Mode property to ParsingMode.LongShort, the ParseOptions.ArgumentNameComparison property to StringComparison.InvariantCulture, the ParseOptions.ArgumentNameTransform property to NameTransform.DashCase, the ParseOptions.ValueDescriptionTransform property to NameTransform.DashCase, the CommandNameComparison property to StringComparison.InvariantCulture, and the CommandNameTransform property to NameTransform.DashCase.

This property will only return true if the above properties are the indicated values, except that the ParseOptions.ArgumentNameComparison and CommandNameComparison properties can be any case-sensitive comparison. It will return false for any other combination of values, not just the ones indicated below.

Setting this property to false is equivalent to setting the ParseOptions.Mode property to ParsingMode.Default, the ParseOptions.ArgumentNameComparison property to StringComparison.OrdinalIgnoreCase, the ParseOptions.ArgumentNameTransform property to NameTransform.None, the ParseOptions.ValueDescriptionTransform property to NameTransform.None, the CommandNameComparison property to StringComparison.OrdinalIgnoreCase, and the CommandNameTransform property to NameTransform.None.

See Also