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