OptionsBuilderConfigurationExtensions.Bind OptionsBuilderConfigurationExtensions.Bind OptionsBuilderConfigurationExtensions.Bind Method

Definition

Overloads

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.

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

Registers a configuration instance which TOptions will bind against.

public static Microsoft.Extensions.Options.OptionsBuilder<TOptions> Bind<TOptions> (this Microsoft.Extensions.Options.OptionsBuilder<TOptions> optionsBuilder, Microsoft.Extensions.Configuration.IConfiguration config) where TOptions : class;
static member Bind : Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)> * Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)> (requires 'Options : null)
<Extension()>
Public Function Bind(Of TOptions As Class) (optionsBuilder As OptionsBuilder(Of TOptions), config As IConfiguration) As OptionsBuilder(Of TOptions)

Type Parameters

TOptions

The options type to be configured.

Parameters

optionsBuilder
OptionsBuilder<TOptions> OptionsBuilder<TOptions> OptionsBuilder<TOptions>

The options builder to add the services to.

config
IConfiguration IConfiguration IConfiguration

The configuration being bound.

Returns

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.

public static Microsoft.Extensions.Options.OptionsBuilder<TOptions> Bind<TOptions> (this Microsoft.Extensions.Options.OptionsBuilder<TOptions> optionsBuilder, Microsoft.Extensions.Configuration.IConfiguration config, Action<Microsoft.Extensions.Configuration.BinderOptions> configureBinder) where TOptions : class;
static member Bind : Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)> * Microsoft.Extensions.Configuration.IConfiguration * Action<Microsoft.Extensions.Configuration.BinderOptions> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)> (requires 'Options : null)
<Extension()>
Public Function Bind(Of TOptions As Class) (optionsBuilder As OptionsBuilder(Of TOptions), config As IConfiguration, configureBinder As Action(Of BinderOptions)) As OptionsBuilder(Of TOptions)

Type Parameters

TOptions

The options type to be configured.

Parameters

optionsBuilder
OptionsBuilder<TOptions> OptionsBuilder<TOptions> OptionsBuilder<TOptions>

The options builder to add the services to.

config
IConfiguration IConfiguration IConfiguration

The configuration being bound.

configureBinder
Action<BinderOptions>

Used to configure the BinderOptions.

Returns

Applies to