Interface IValidator<T>
- Namespace
- Visus.AddressValidation.Validation
- Assembly
- Visus.AddressValidation.dll
Defines a validator for a given type.
public interface IValidator<in T> where T : class
Type Parameters
TThe type of object to validate.
Methods
ExecuteAsync(T, CancellationToken)
Executes validation against the specified instance.
ValueTask<IValidationResult> ExecuteAsync(T instance, CancellationToken cancellationToken = default)
Parameters
instanceTThe instance which will be validated against.
cancellationTokenCancellationTokenA cancellation token that can be used to cancel the work.
Returns
- ValueTask<IValidationResult>
An IValidationResult object containing any validation errors or warnings.