CommandLineParserArgumentParsed 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

EventHandlerArgumentParsedEventArgs

Remarks

Set the ArgumentParsedEventArgsCancelParsing 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 explicitly in the event handler.

The ArgumentParsedEventArgsCancelParsing property is initialized to the value of the CommandLineArgumentAttributeCancelParsing property, or the method return value of an argument using ArgumentKindMethod. Reset the value to CancelModeNone to continue parsing anyway.

This event is invoked after the CommandLineArgumentValue and CommandLineArgumentUsedArgumentName properties have been set.

See Also