ArgumentConverter Class

Base class for converters from a string to the type of an argument.

Definition

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

Remarks

To create a custom argument converter, you must implement at least the Convert(String, CultureInfo, CommandLineArgument) method. If it's possible to convert to the target type from a ReadOnlySpanT structure, it's strongly recommended to also implement the Convert(ReadOnlySpanChar, CultureInfo, CommandLineArgument) method.

Constructors

ArgumentConverterInitializes a new instance of the ArgumentConverter class

Methods

Convert(ReadOnlySpanChar, CultureInfo, CommandLineArgument) Converts a string span to the type of the argument.
Convert(String, CultureInfo, CommandLineArgument) Converts a string to the type of the argument.
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