OptionsConfigurationServiceCollectionExtensions.Configure Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Sobrecargas
Configure<TOptions>(IServiceCollection, IConfiguration) |
Registra una instancia de configuración para enlazarla a |
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)
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>)
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)
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>)
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.