OptionsBuilder<TOptions> OptionsBuilder<TOptions> OptionsBuilder<TOptions> Class

Definition

Used to configure TOptions instances.

public class OptionsBuilder<TOptions> where TOptions : class
type OptionsBuilder<'Options (requires 'Options : null)> = class
Public Class OptionsBuilder(Of TOptions)

Type Parameters

TOptions

The type of options being requested.

Inheritance
OptionsBuilder<TOptions>OptionsBuilder<TOptions>OptionsBuilder<TOptions>

Constructors

OptionsBuilder<TOptions>(IServiceCollection, String) OptionsBuilder<TOptions>(IServiceCollection, String) OptionsBuilder<TOptions>(IServiceCollection, String)

Constructor.

Properties

Name Name Name

The default name of the TOptions instance.

Services Services Services

The IServiceCollection for the options being configured.

Methods

Configure(Action<TOptions>) Configure(Action<TOptions>) Configure(Action<TOptions>)

Registers an action used to configure a particular type of options. Note: These are run before all .

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

Registers an action used to configure a particular type of options. Note: These are run before all .

Configure<TDep1,TDep2,TDep3,TDep4,TDep5>(Action<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>) Configure<TDep1,TDep2,TDep3,TDep4,TDep5>(Action<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>) Configure<TDep1,TDep2,TDep3,TDep4,TDep5>(Action<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>)

Registers an action used to configure a particular type of options. Note: These are run before all .

Configure<TDep1,TDep2,TDep3,TDep4>(Action<TOptions,TDep1,TDep2,TDep3,TDep4>) Configure<TDep1,TDep2,TDep3,TDep4>(Action<TOptions,TDep1,TDep2,TDep3,TDep4>) Configure<TDep1,TDep2,TDep3,TDep4>(Action<TOptions,TDep1,TDep2,TDep3,TDep4>)

Registers an action used to configure a particular type of options. Note: These are run before all .

Configure<TDep1,TDep2,TDep3>(Action<TOptions,TDep1,TDep2,TDep3>) Configure<TDep1,TDep2,TDep3>(Action<TOptions,TDep1,TDep2,TDep3>) Configure<TDep1,TDep2,TDep3>(Action<TOptions,TDep1,TDep2,TDep3>)

Registers an action used to configure a particular type of options. Note: These are run before all .

Configure<TDep1,TDep2>(Action<TOptions,TDep1,TDep2>) Configure<TDep1,TDep2>(Action<TOptions,TDep1,TDep2>) Configure<TDep1,TDep2>(Action<TOptions,TDep1,TDep2>)

Registers an action used to configure a particular type of options. Note: These are run before all .

PostConfigure(Action<TOptions>) PostConfigure(Action<TOptions>) PostConfigure(Action<TOptions>)

Registers an action used to configure a particular type of options. Note: These are run after all .

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

Registers an action used to post configure a particular type of options. Note: These are run before after .

PostConfigure<TDep1,TDep2,TDep3,TDep4,TDep5>(Action<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>) PostConfigure<TDep1,TDep2,TDep3,TDep4,TDep5>(Action<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>) PostConfigure<TDep1,TDep2,TDep3,TDep4,TDep5>(Action<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>)

Registers an action used to post configure a particular type of options. Note: These are run before after .

PostConfigure<TDep1,TDep2,TDep3,TDep4>(Action<TOptions,TDep1,TDep2,TDep3,TDep4>) PostConfigure<TDep1,TDep2,TDep3,TDep4>(Action<TOptions,TDep1,TDep2,TDep3,TDep4>) PostConfigure<TDep1,TDep2,TDep3,TDep4>(Action<TOptions,TDep1,TDep2,TDep3,TDep4>)

Registers an action used to post configure a particular type of options. Note: These are run before after .

PostConfigure<TDep1,TDep2,TDep3>(Action<TOptions,TDep1,TDep2,TDep3>) PostConfigure<TDep1,TDep2,TDep3>(Action<TOptions,TDep1,TDep2,TDep3>) PostConfigure<TDep1,TDep2,TDep3>(Action<TOptions,TDep1,TDep2,TDep3>)

Registers an action used to post configure a particular type of options. Note: These are run before after .

PostConfigure<TDep1,TDep2>(Action<TOptions,TDep1,TDep2>) PostConfigure<TDep1,TDep2>(Action<TOptions,TDep1,TDep2>) PostConfigure<TDep1,TDep2>(Action<TOptions,TDep1,TDep2>)

Registers an action used to post configure a particular type of options. Note: These are run before after .

Validate(Func<TOptions,Boolean>) Validate(Func<TOptions,Boolean>) Validate(Func<TOptions,Boolean>)

Register a validation action for an options type using a default failure message..

Validate(Func<TOptions,Boolean>, String) Validate(Func<TOptions,Boolean>, String) Validate(Func<TOptions,Boolean>, String)

Register a validation action for an options type.

Extension Methods

Bind<TOptions>(OptionsBuilder<TOptions>, IConfiguration) Bind<TOptions>(OptionsBuilder<TOptions>, IConfiguration) Bind<TOptions>(OptionsBuilder<TOptions>, IConfiguration)

Registers a configuration instance which TOptions will bind against.

Bind<TOptions>(OptionsBuilder<TOptions>, IConfiguration, Action<BinderOptions>) Bind<TOptions>(OptionsBuilder<TOptions>, IConfiguration, Action<BinderOptions>) Bind<TOptions>(OptionsBuilder<TOptions>, IConfiguration, Action<BinderOptions>)

Registers a configuration instance which TOptions will bind against.

ValidateDataAnnotations<TOptions>(OptionsBuilder<TOptions>) ValidateDataAnnotations<TOptions>(OptionsBuilder<TOptions>) ValidateDataAnnotations<TOptions>(OptionsBuilder<TOptions>)

Register this options instance for validation of its DataAnnotations.

Applies to