ArgumentValidationAttributeValidatePreConversion Method

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

Definition

Namespace: Ookii.CommandLine.Validation
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 5.0.0+724ca9b7fa5edc075ec2ae65044e61b0d494fd1c
C#
public void ValidatePreConversion(
	CommandLineArgument argument,
	ReadOnlyMemory<char> value
)

Parameters

argument  CommandLineArgument
The argument being validated.
value  ReadOnlyMemoryChar
A string memory region containing the raw argument value as it was provided on the command line.

Remarks

This method calls the IsValidPreConversion(CommandLineArgument, ReadOnlyMemoryChar) method to do the actual validation.

Exceptions

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

See Also