NullableConverter Class

Converts from a string to a NullableT.

Definition

Namespace: Ookii.CommandLine.Conversion
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public class NullableConverter : ArgumentConverter
Inheritance
Object    ArgumentConverter    NullableConverter

Remarks

This converter uses the specified converter for the type T, except when the input is an empty string, in which case it return . This parallels the behavior of the System.ComponentModelNullableConverter.

Constructors

NullableConverter Initializes a new instance of the NullableConverter class.

Properties

BaseConverter Gets the converter for the underlying type.

Methods

Convert(ReadOnlySpanChar, CultureInfo, CommandLineArgument) Converts a string span to the type of the argument.
(Overrides ArgumentConverterConvert(ReadOnlySpanChar, CultureInfo, CommandLineArgument))
Convert(String, CultureInfo, CommandLineArgument) Converts a string to the type of the argument.
(Overrides ArgumentConverterConvert(String, CultureInfo, CommandLineArgument))
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

See Also