Click or drag to resize

CommandLineParserAllowWhiteSpaceValueSeparator Property

Gets or sets a value indicating whether the value of arguments may be separated from the name by white space.

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

Property Value

Type: Boolean
if white space is allowed to separate an argument name and its value; if only the colon (:) is allowed. The default value is .
Remarks

If the AllowWhiteSpaceValueSeparator property is , the value of an argument can be separated from its name either by using a colon (:) or by using white space. Given a named argument named "sample", the command lines -sample:value and -sample value are both valid and will assign the value "value" to the argument.

If the AllowWhiteSpaceValueSeparator property is , only the colon (:) is allowed to separate the value from the name. The command line -sample:value still assigns the value "value" to the argument, but for the command line "-sample value" the argument is considered not to have a value (which is only valid if IsSwitch is ), and "value" is considered to be the value for the next positional argument.

For switch arguments (IsSwitch is ), only the colon (:) is allowed to specify an explicit value regardless of the value of the AllowWhiteSpaceValueSeparator property. Given a switch argument named "switch" the command line -switch false is interpreted to mean that the value of "switch" is and the value of the next positional argument is "false", even if the AllowWhiteSpaceValueSeparator property is .

See Also