NonSwitchBoolean Structure

Helper type that allows the creation of a Boolean argument that is not a switch.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 5.0.0+724ca9b7fa5edc075ec2ae65044e61b0d494fd1c
C#
public struct NonSwitchBoolean : ISpanParsable<NonSwitchBoolean>, 
	IParsable<NonSwitchBoolean>
Inheritance
Object    ValueType    NonSwitchBoolean
Implements
IParsableNonSwitchBoolean, ISpanParsableNonSwitchBoolean

Remarks

A command line argument using this type will be a regular named argument that requires an explicit value of either "true" or "false". This is contrary to switch arguments, which do not require a value.

There is no need to use the NonSwitchBoolean structure with positional arguments, as a positional argument cannot be a switch even if its type is Boolean.

Constructors

NonSwitchBoolean Initializes a new instance of the NonSwitchBoolean structure.

Properties

Value Gets or sets the value.

Methods

EqualsIndicates whether this instance and a specified object are equal.
(Inherited from ValueType)
GetHashCodeReturns the hash code for this instance.
(Inherited from ValueType)
GetTypeGets the Type of the current instance.
(Inherited from Object)
Parse(ReadOnlySpanChar) Converts the specified string span to a NonSwitchBoolean value.
Parse(String) Converts the specified string to a NonSwitchBoolean value.
ToStringReturns the fully qualified type name of this instance.
(Inherited from ValueType)
TryParse(ReadOnlySpanChar, NonSwitchBoolean) Tries to convert the specified string span to a NonSwitchBoolean value.
TryParse(String, NonSwitchBoolean) Tries to convert the specified string to a NonSwitchBoolean value.

Operators

(Boolean to NonSwitchBoolean) Converts a Boolean to a NonSwitchBoolean.
(NonSwitchBoolean to Boolean) Converts a NonSwitchBoolean structure to a Boolean.

See Also