KeyValuePairConverterTKey, TValue(ArgumentConverter, ArgumentConverter, String, Boolean) Constructor

Initializes a new instance of the KeyValuePairConverterTKey, TValue class with the specified key and value converters and options.

Definition

Namespace: Ookii.CommandLine.Conversion
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public KeyValuePairConverter(
	ArgumentConverter keyConverter,
	ArgumentConverter valueConverter,
	string? separator,
	bool allowNullValues
)

Parameters

keyConverter  ArgumentConverter
The ArgumentConverter used to convert the key/value pair's keys.
valueConverter  ArgumentConverter
The ArgumentConverter used to convert the key/value pair's values.
separator  String
An optional custom key/value separator. If , the value of KeyValuePairConverterDefaultSeparator is used.
allowNullValues  Boolean
Indicates whether the type of the pair's value accepts values.

Exceptions

ArgumentNullExceptionkeyConverter or valueConverter is .
ArgumentExceptionseparator is an empty string.

See Also