Freigeben über


Microsoft.Extensions.Options Namespace

Provides types used for implementing the options pattern.

Classes

ConfigurationChangeTokenSource<TOptions>

Creates IChangeTokens so that IOptionsMonitor<TOptions> gets notified when IConfiguration changes.

ConfigureFromConfigurationOptions<TOptions>

Configures an option instance by using Bind(IConfiguration, Object) against an IConfiguration.

ConfigureNamedOptions<TOptions>

Implementation of IConfigureNamedOptions<TOptions>.

ConfigureNamedOptions<TOptions,TDep>

Implementation of IConfigureNamedOptions<TOptions>.

ConfigureNamedOptions<TOptions,TDep1,TDep2>

Implementation of IConfigureNamedOptions<TOptions>.

ConfigureNamedOptions<TOptions,TDep1,TDep2,TDep3>

Implementation of IConfigureNamedOptions<TOptions>.

ConfigureNamedOptions<TOptions,TDep1,TDep2,TDep3,TDep4>

Implementation of IConfigureNamedOptions<TOptions>.

ConfigureNamedOptions<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>

Implementation of IConfigureNamedOptions<TOptions>.

ConfigureOptions<TOptions>

Implementation of IConfigureOptions<TOptions>.

DataAnnotationValidateOptions<TOptions>

Implementation of IValidateOptions<TOptions> that uses DataAnnotation's Validator for validation.

NamedConfigureFromConfigurationOptions<TOptions>

Configures an option instance by using Bind(IConfiguration, Object) against an IConfiguration.

Options

Helper class.

OptionsBuilder<TOptions>

Used to configure TOptions instances.

OptionsCache<TOptions>

Used to cache TOptions instances.

OptionsFactory<TOptions>

Implementation of IOptionsFactory<TOptions>.

OptionsManager<TOptions>

Implementation of IOptions<TOptions> and IOptionsSnapshot<TOptions>.

OptionsMonitor<TOptions>

Implementation of IOptionsMonitor<TOptions>.

OptionsMonitorExtensions

Extension methods for IOptionsMonitor<TOptions>.

OptionsValidationException

Thrown when options validation fails.

OptionsValidatorAttribute

Triggers the automatic generation of the implementation of IValidateOptions<TOptions> at compile time.

OptionsWrapper<TOptions>

IOptions<TOptions> wrapper that returns the options instance.

PostConfigureOptions<TOptions>

Implementation of IPostConfigureOptions<TOptions>.

PostConfigureOptions<TOptions,TDep>

Implementation of IPostConfigureOptions<TOptions>.

PostConfigureOptions<TOptions,TDep1,TDep2>

Implementation of IPostConfigureOptions<TOptions>.

PostConfigureOptions<TOptions,TDep1,TDep2,TDep3>

Implementation of IPostConfigureOptions<TOptions>.

PostConfigureOptions<TOptions,TDep1,TDep2,TDep3,TDep4>

Implementation of IPostConfigureOptions<TOptions>.

PostConfigureOptions<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>

Implementation of IPostConfigureOptions<TOptions>.

ValidateEnumeratedItemsAttribute

Marks a field or property to be enumerated, and each enumerated object to be validated.

ValidateObjectMembersAttribute

Marks a field or property to be validated transitively.

ValidateOptions<TOptions>

Implementation of IValidateOptions<TOptions>

ValidateOptions<TOptions,TDep>

Implementation of IValidateOptions<TOptions>

ValidateOptions<TOptions,TDep1,TDep2>

Implementation of IValidateOptions<TOptions>

ValidateOptions<TOptions,TDep1,TDep2,TDep3>

Implementation of IValidateOptions<TOptions>

ValidateOptions<TOptions,TDep1,TDep2,TDep3,TDep4>

Implementation of IValidateOptions<TOptions>

ValidateOptions<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>

Implementation of IValidateOptions<TOptions>

ValidateOptionsResult

Represents the result of an options validation.

ValidateOptionsResultBuilder

Builds ValidateOptionsResult with support for multiple error messages.

Interfaces

IConfigureNamedOptions<TOptions>

Represents something that configures the TOptions type.

IConfigureOptions<TOptions>

Represents something that configures the TOptions type. Note: These are run before all IPostConfigureOptions<TOptions>.

IOptions<TOptions>

Used to retrieve configured TOptions instances.

IOptionsChangeTokenSource<TOptions>

Used to fetch IChangeToken used for tracking options changes.

IOptionsFactory<TOptions>

Used to create TOptions instances.

IOptionsMonitor<TOptions>

Used for notifications when TOptions instances change.

IOptionsMonitorCache<TOptions>

Used by IOptionsMonitor<TOptions> to cache TOptions instances.

IOptionsSnapshot<TOptions>

Used to access the value of TOptions for the lifetime of a request.

IPostConfigureOptions<TOptions>

Represents something that configures the TOptions type. Note: These are run after all IConfigureOptions<TOptions>.

IStartupValidator

Interface used by hosts to validate options during startup. Options are enabled to be validated during startup by calling ValidateOnStart<TOptions>(OptionsBuilder<TOptions>).

IValidateOptions<TOptions>

Interface used to validate options.

Remarks

For more information about implementing the options pattern, see Options pattern in .NET.