public override bool IsValid(
CommandLineArgument argument,
Object? value
)
Public Overrides Function IsValid (
argument As CommandLineArgument,
value As Object
) As Boolean
Dim instance As ValidateEnumValueAttribute
Dim argument As CommandLineArgument
Dim value As Object
Dim returnValue As Boolean
returnValue = instance.IsValid(argument,
value)
public:
virtual bool IsValid(
CommandLineArgument^ argument,
Object^ value
) override
If the Mode property is ValidationModeBeforeConversion, the value parameter will be the raw string value provided by the user on the command line.
If the Mode property is ValidationModeAfterConversion, for regular arguments, the value parameter will be identical to the CommandLineArgumentValue property. For multi-value or dictionary arguments, the value parameter will be equal to the last value added to the collection or dictionary.
If the Mode property is ValidationModeAfterParsing, value will always be . Use the CommandLineArgumentValue property instead.
If you need to check the type of the argument, use the CommandLineArgumentElementType property unless you want to get the collection type for a multi-value or dictionary argument.
NotSupportedException | argument is not an argument with an enumeration type. |