ArgumentValidationAttributeValidate Method

Validates the argument value, and throws an exception if validation failed.

Definition

Namespace: Ookii.CommandLine.Validation
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public void Validate(
	CommandLineArgument argument,
	Object? value
)

Parameters

argument  CommandLineArgument
The argument being validated.
value  Object
The argument value. If not , this must be a string or an instance of CommandLineArgumentArgumentType.

Exceptions

CommandLineArgumentException The value parameter is not a valid value. The CommandLineArgumentExceptionCategory property will be the value of the ErrorCategory property.

See Also