KeyValuePairConverterTKey, TValue Class

Converts key-value pairs to and from strings using "key=value" notation.

Definition

Namespace: Ookii.CommandLine.Conversion
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public class KeyValuePairConverter<TKey, TValue> : ArgumentConverter
Inheritance
Object    ArgumentConverter    KeyValuePairConverterTKey, TValue

Type Parameters

TKey
The type of the key.
TValue
The type of the value.

Remarks

This ArgumentConverter is used for dictionary command line arguments by default.

The behavior of this converter can be customized by applying the KeyConverterAttribute, ValueConverterAttribute or KeyValueSeparatorAttribute attribute to the property or method defining a dictionary argument.

Constructors

KeyValuePairConverterTKey, TValue Initializes a new instance of the KeyValuePairConverterTKey, TValue class.
KeyValuePairConverterTKey, TValue(ArgumentConverter, ArgumentConverter, String, Boolean) Initializes a new instance of the KeyValuePairConverterTKey, TValue class with the specified key and value converters and options.

Properties

AllowNullValues Gets a value which indicates whether the values of the key/value pair can be .
KeyConverter Gets the converter used for the keys of the key/value pair.
Separator Gets the key/value separator.
ValueConverter Gets the converter used for the values of the key/value pair.

Methods

Convert(ReadOnlySpanChar, CultureInfo, CommandLineArgument) Converts a string span to a KeyValuePairTKey, TValue.
(Overrides ArgumentConverterConvert(ReadOnlySpanChar, CultureInfo, CommandLineArgument))
Convert(String, CultureInfo, CommandLineArgument) Converts a string to a KeyValuePairTKey, TValue.
(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