Microsoft.Extensions.Options.AsyncValidateOptions<TOptions, TDep1, TDep2, TDep3, TDep4>
public class AsyncValidateOptions<TOptions, TDep1, TDep2, TDep3, TDep4> : 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 error to return when validation fails.
Gets the options name.
public Func<TOptions, TDep1, TDep2, TDep3, TDep4, CancellationToken, Task<bool>> Validation { get; }
Gets the asynchronous validation function.
public AsyncValidateOptions(string name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, Func<TOptions, TDep1, TDep2, TDep3, TDep4, CancellationToken, Task<bool>> validation, string failureMessage)
Initializes a new instance of AsyncValidateOptions<T, U, V, W, X>.
Attempts to validate a specific named options instance synchronously.
public Task<ValidateOptionsResult> ValidateAsync(string name, TOptions options, CancellationToken cancellationToken = default)