StringConverter Class

A converter for arguments with string values.

Definition

Namespace: Ookii.CommandLine.Conversion
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public class StringConverter : ArgumentConverter
Inheritance
Object    ArgumentConverter    StringConverter

Remarks

This converter does not perform any actual conversion, and returns the existing string as-is. If the input was a ReadOnlySpanT for Char, a new string is allocated for it.

Constructors

StringConverterInitializes a new instance of the StringConverter class

Methods

Convert(ReadOnlySpanChar, CultureInfo, CommandLineArgument) Converts a string span to the type of the argument.
(Inherited from ArgumentConverter)
Convert(String, CultureInfo, CommandLineArgument) Returns the original string value without modification.
(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)

Fields

Instance A default instance of the converter.

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