ParentCommandOnDuplicateArgumentWarning Method

Method called when the ParseOptionsDuplicateArguments property is set to ErrorModeWarning and a duplicate argument value was encountered.

Definition

Namespace: Ookii.CommandLine.Commands
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
protected virtual bool OnDuplicateArgumentWarning(
	CommandLineArgument argument,
	string? newValue
)

Parameters

argument  CommandLineArgument
The duplicate argument.
newValue  String
The new value for the argument.

Return Value

Boolean
to use the new value for the argument; to keep the old value. The base class implementation always returns .

Remarks

The base class implementation writes a warning to the ParseOptionsError writer.

This method will not be called if the nested subcommand uses the ICommandWithCustomParsing interface.

See Also