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