<PackageReference Include="Microsoft.Extensions.Options" Version="10.0.8" />

Microsoft.Extensions.Options.ValidateOptions<TOptions, TDep1, TDep2, TDep3, TDep4>

public class ValidateOptions<TOptions, TDep1, TDep2, TDep3, TDep4> : IValidateOptions<TOptions>
Implementation of IValidateOptions<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 TDep4 Dependency4 { get; }

Gets the fourth 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, TDep4, bool> Validation { get; }

Gets the validation function.

public ValidateOptions(string name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, Func<TOptions, TDep1, TDep2, TDep3, TDep4, bool> validation, string failureMessage)

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

public ValidateOptionsResult Validate(string name, TOptions options)

Validates a specific named options instance (or all when name is null).