CommandLineParser.ArgumentParsed Event

Event raised when an argument is parsed from the command line.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public event EventHandler<ArgumentParsedEventArgs> ArgumentParsed

Value

EventHandler<ArgumentParsedEventArgs>

Remarks

Set the ArgumentParsedEventArgs.CancelParsing property in the event handler to cancel parsing at the current argument. To have usage help shown by the parse methods that do this automatically, you must set the HelpRequested property to true explicitly in the event handler.

The ArgumentParsedEventArgs.CancelParsing property is initialized to the value of the CommandLineArgumentAttribute.CancelParsing property, or the method return value of an argument using ArgumentKind.Method. Reset the value to CancelMode.None to continue parsing anyway.

This event is invoked after the CommandLineArgument.Value and CommandLineArgument.UsedArgumentName properties have been set.

See Also