Microsoft.Extensions.Options.AsyncValidateOptions<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5>
public class AsyncValidateOptions<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5> : IAsyncValidateOptions<TOptions>, IValidateOptions<TOptions>, IOptionsValidatorNameMetadata
Implementation of IAsyncValidateOptions<T>.
Gets the first dependency.
Gets the second dependency.
Gets the third dependency.
Gets the fourth dependency.
Gets the fifth dependency.
Gets the error to return when validation fails.
Gets the options name.
public Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, CancellationToken, Task<bool>> Validation { get; }
Gets the asynchronous validation function.
public AsyncValidateOptions(string name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, TDep5 dependency5, Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, CancellationToken, Task<bool>> validation, string failureMessage)
Initializes a new instance of AsyncValidateOptions<T, U, V, W, X, Y>.
Attempts to validate a specific named options instance synchronously.
public Task<ValidateOptionsResult> ValidateAsync(string name, TOptions options, CancellationToken cancellationToken = default)