Compartir vía


OptionsConfigurationServiceCollectionExtensions.Configure Método

Definición

Sobrecargas

Configure<TOptions>(IServiceCollection, IConfiguration)

Registra una instancia de configuración para enlazarla a TOptions y actualiza las opciones cuando cambia la configuración.

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

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

Configure<TOptions>(IServiceCollection, String, IConfiguration)

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

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

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

Configure<TOptions>(IServiceCollection, IConfiguration)

Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.cs

Registra una instancia de configuración para enlazarla a TOptions y actualiza las opciones cuando cambia la configuración.

public:
generic <typename TOptions>
 where TOptions : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ Configure(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfiguration ^ config);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration config) where TOptions : class;
static member Configure : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function Configure(Of TOptions As Class) (services As IServiceCollection, config As IConfiguration) As IServiceCollection

Parámetros de tipo

TOptions

Tipo de opciones que se configuran.

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

config
IConfiguration

La configuración que se enlaza.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a

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

Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.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::DependencyInjection::IServiceCollection ^ Configure(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfiguration ^ config, Action<Microsoft::Extensions::Configuration::BinderOptions ^> ^ configureBinder);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration config, Action<Microsoft.Extensions.Configuration.BinderOptions>? configureBinder) where TOptions : class;
static member Configure : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfiguration * Action<Microsoft.Extensions.Configuration.BinderOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function Configure(Of TOptions As Class) (services As IServiceCollection, config As IConfiguration, configureBinder As Action(Of BinderOptions)) As IServiceCollection

Parámetros de tipo

TOptions

Tipo de opciones que se configuran.

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la 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 IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a

Configure<TOptions>(IServiceCollection, String, IConfiguration)

Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.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::DependencyInjection::IServiceCollection ^ Configure(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Microsoft::Extensions::Configuration::IConfiguration ^ config);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string? name, Microsoft.Extensions.Configuration.IConfiguration config) where TOptions : class;
static member Configure : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function Configure(Of TOptions As Class) (services As IServiceCollection, name As String, config As IConfiguration) As IServiceCollection

Parámetros de tipo

TOptions

Tipo de opciones que se configuran.

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

name
String

El nombre de la instancia de opciones.

config
IConfiguration

La configuración que se enlaza.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a

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

Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.cs
Source:
OptionsConfigurationServiceCollectionExtensions.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::DependencyInjection::IServiceCollection ^ Configure(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Microsoft::Extensions::Configuration::IConfiguration ^ config, Action<Microsoft::Extensions::Configuration::BinderOptions ^> ^ configureBinder);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string? name, Microsoft.Extensions.Configuration.IConfiguration config, Action<Microsoft.Extensions.Configuration.BinderOptions>? configureBinder) where TOptions : class;
static member Configure : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Microsoft.Extensions.Configuration.IConfiguration * Action<Microsoft.Extensions.Configuration.BinderOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function Configure(Of TOptions As Class) (services As IServiceCollection, name As String, config As IConfiguration, configureBinder As Action(Of BinderOptions)) As IServiceCollection

Parámetros de tipo

TOptions

Tipo de opciones que se configuran.

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

name
String

El nombre de la instancia de opciones.

config
IConfiguration

La configuración que se enlaza.

configureBinder
Action<BinderOptions>

Se usa para configurar BinderOptions.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a