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.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
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