Table of Contents

Class DataAnnotationsValidator<T>

Namespace
SEBT.Portal.Kernel
Assembly
SEBT.Portal.Kernel.dll
public class DataAnnotationsValidator<T> : IValidator<T> where T : notnull

Type Parameters

T
Inheritance
object
DataAnnotationsValidator<T>
Implements

Constructors

DataAnnotationsValidator(IServiceProvider)

public DataAnnotationsValidator(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

Methods

Validate(T, CancellationToken)

Validates the specified object.

public Task<ValidationResult> Validate(T command, CancellationToken cancellationToken = default)

Parameters

command T

The object to validate.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<ValidationResult>

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