OptionsServiceCollectionExtensions Class

Definition

Extension methods for adding options services to the DI container.

public ref class OptionsServiceCollectionExtensions abstract sealed
public static class OptionsServiceCollectionExtensions
type OptionsServiceCollectionExtensions = class
Public Module OptionsServiceCollectionExtensions
Inheritance
OptionsServiceCollectionExtensions

Methods

AddOptions(IServiceCollection)

Adds services required for using options.

AddOptions<TOptions>(IServiceCollection, String)

Gets an options builder that forwards Configure calls for the same named TOptions to the underlying service collection.

AddOptions<TOptions>(IServiceCollection)

Gets an options builder that forwards Configure calls for the same TOptions to the underlying service collection.

AddOptionsWithValidateOnStart<TOptions,TValidateOptions>(IServiceCollection, String)

Adds services required for using options and enforces options validation check on start rather than in runtime.

AddOptionsWithValidateOnStart<TOptions>(IServiceCollection, String)

Adds services required for using options and enforces options validation check on start rather than in runtime.

Configure<TOptions>(IServiceCollection, Action<TOptions>)

Registers an action used to configure a particular type of options. Note: These are run before all PostConfigure<TOptions>(IServiceCollection, Action<TOptions>).

Configure<TOptions>(IServiceCollection, String, Action<TOptions>)

Registers an action used to configure a particular type of options. Note: These are run before all PostConfigure<TOptions>(IServiceCollection, Action<TOptions>).

ConfigureAll<TOptions>(IServiceCollection, Action<TOptions>)

Registers an action used to configure all instances of a particular type of options.

ConfigureOptions(IServiceCollection, Object)

Registers an object that will have all of its IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>, and IValidateOptions<TOptions> registered.

ConfigureOptions(IServiceCollection, Type)

Registers a type that will have all of its IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>, and IValidateOptions<TOptions> registered.

ConfigureOptions<TConfigureOptions>(IServiceCollection)

Registers a type that will have all of its IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>, and IValidateOptions<TOptions> registered.

PostConfigure<TOptions>(IServiceCollection, Action<TOptions>)

Registers an action used to initialize a particular type of options. Note: These are run after all Configure<TOptions>(IServiceCollection, Action<TOptions>).

PostConfigure<TOptions>(IServiceCollection, String, Action<TOptions>)

Registers an action used to configure a particular type of options. Note: These are run after all Configure<TOptions>(IServiceCollection, Action<TOptions>).

PostConfigureAll<TOptions>(IServiceCollection, Action<TOptions>)

Registers an action used to post configure all instances of a particular type of options. Note: These are run after all Configure<TOptions>(IServiceCollection, Action<TOptions>).

Applies to