Show / Hide Table of Contents

Interface IValidator<TRequest>

Defines a contract for validating a specific request.

Namespace: MediatorForge.CQRS.Validators
Assembly: MediatorForge.dll
Syntax
public interface IValidator<in TRequest>
Type Parameters
Name Description
TRequest

The type of the request to validate.

Methods

| Improve this Doc View Source

ValidateAsync(TRequest, CancellationToken)

Asynchronously validates the specified request.

Declaration
Task<ValidationResult> ValidateAsync(TRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
TRequest request

The request to validate.

CancellationToken cancellationToken

The request cancellation token.

Returns
Type Description
Task<ValidationResult>

A task that represents the asynchronous validation operation. The task result contains the ValidationResult.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX