Compartir a través de


OptionsBuilderConfigurationExtensions.Bind Método

Definición

Sobrecargas

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

Registra una instancia de configuración sobre la que se enlazará TOptions.

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

Registra una instancia de configuración sobre la que se enlazará TOptions.

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

Source:
OptionsBuilderConfigurationExtensions.cs
Source:
OptionsBuilderConfigurationExtensions.cs
Source:
OptionsBuilderConfigurationExtensions.cs
Source:
OptionsBuilderConfigurationExtensions.cs

Registra una instancia de configuración sobre la que se enlazará TOptions.

public:
generic <typename TOptions>
 where TOptions : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Bind(Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ optionsBuilder, Microsoft::Extensions::Configuration::IConfiguration ^ config);
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)

Parámetros de tipo

TOptions

Tipo de opciones que se va a configurar.

Parámetros

optionsBuilder
OptionsBuilder<TOptions>

El generador de opciones al que se van a agregar los servicios.

config
IConfiguration

La configuración que se enlaza.

Devoluciones

La interfaz OptionsBuilder<TOptions> para que se puedan encadenar llamadas adicionales.

Se aplica a

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

Source:
OptionsBuilderConfigurationExtensions.cs
Source:
OptionsBuilderConfigurationExtensions.cs
Source:
OptionsBuilderConfigurationExtensions.cs
Source:
OptionsBuilderConfigurationExtensions.cs

Registra una instancia de configuración sobre la que se enlazará TOptions.

public:
generic <typename TOptions>
 where TOptions : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Bind(Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ optionsBuilder, Microsoft::Extensions::Configuration::IConfiguration ^ config, Action<Microsoft::Extensions::Configuration::BinderOptions ^> ^ configureBinder);
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)

Parámetros de tipo

TOptions

Tipo de opciones que se va a configurar.

Parámetros

optionsBuilder
OptionsBuilder<TOptions>

El generador de opciones al que se van a agregar los servicios.

config
IConfiguration

La configuración que se enlaza.

configureBinder
Action<BinderOptions>

Se usa para configurar BinderOptions.

Devoluciones

La interfaz OptionsBuilder<TOptions> para que se puedan encadenar llamadas adicionales.

Se aplica a