<PackageReference Include="Microsoft.Extensions.Options" Version="11.0.0-preview.6.26359.118" />

Microsoft.Extensions.Options.AsyncValidateOptions<TOptions, TDep1, TDep2, TDep3>

public class AsyncValidateOptions<TOptions, TDep1, TDep2, TDep3> : IAsyncValidateOptions<TOptions>
Implementation of IAsyncValidateOptions<T>.
public TDep1 Dependency1 { get; }

Gets the first dependency.

public TDep2 Dependency2 { get; }

Gets the second dependency.

public TDep3 Dependency3 { get; }

Gets the third dependency.

public string FailureMessage { get; }

Gets the error to return when validation fails.

public string Name { get; }

Gets the options name.

public Func<TOptions, TDep1, TDep2, TDep3, CancellationToken, Task<bool>> Validation { get; }

Gets the asynchronous validation function.

public AsyncValidateOptions(string name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, Func<TOptions, TDep1, TDep2, TDep3, CancellationToken, Task<bool>> validation, string failureMessage)

Initializes a new instance of AsyncValidateOptions<T, U, V, W>.

public Task<ValidateOptionsResult> ValidateAsync(string name, TOptions options, CancellationToken cancellationToken = default)