Table of Contents

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

T

The type of object to validate.

Methods

ExecuteAsync(T, CancellationToken)

Executes validation against the specified instance.

ValueTask<IValidationResult> ExecuteAsync(T instance, CancellationToken cancellationToken = default)

Parameters

instance T

The instance which will be validated against.

cancellationToken CancellationToken

A cancellation token that can be used to cancel the work.

Returns

ValueTask<IValidationResult>

An IValidationResult object containing any validation errors or warnings.