Partilhar via


OptionsConfigurationServiceCollectionExtensions.Configure Método

Definição

Sobrecargas

Configure<TOptions>(IServiceCollection, IConfiguration)

Registra uma instância de configuração à qual TOptions se associará e atualiza as opções quando a configuração for alterada.

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

Registra uma instância de configuração à qual o TOptions se associará.

Configure<TOptions>(IServiceCollection, String, IConfiguration)

Registra uma instância de configuração à qual o TOptions se associará.

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

Registra uma instância de configuração à qual o TOptions se associará.

Configure<TOptions>(IServiceCollection, IConfiguration)

Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs

Registra uma instância de configuração à qual TOptions se associará e atualiza as opções quando a configuração for alterada.

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

O tipo de opções que estão sendo configuradas.

Parâmetros

services
IServiceCollection

O IServiceCollection ao qual adicionar os serviços.

config
IConfiguration

A configuração que está sendo associada.

Retornos

O IServiceCollection para que chamadas adicionais possam ser encadeadas.

Aplica-se a

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

Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs

Registra uma instância de configuração à qual o TOptions se associará.

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

O tipo de opções que estão sendo configuradas.

Parâmetros

services
IServiceCollection

O IServiceCollection ao qual adicionar os serviços.

config
IConfiguration

A configuração que está sendo associada.

configureBinder
Action<BinderOptions>

Usado para configurar o BinderOptions.

Retornos

O IServiceCollection para que chamadas adicionais possam ser encadeadas.

Aplica-se a

Configure<TOptions>(IServiceCollection, String, IConfiguration)

Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs

Registra uma instância de configuração à qual o TOptions se associará.

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

O tipo de opções que estão sendo configuradas.

Parâmetros

services
IServiceCollection

O IServiceCollection ao qual adicionar os serviços.

name
String

O nome da instância de opções.

config
IConfiguration

A configuração que está sendo associada.

Retornos

O IServiceCollection para que chamadas adicionais possam ser encadeadas.

Aplica-se a

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

Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs
Origem:
OptionsConfigurationServiceCollectionExtensions.cs

Registra uma instância de configuração à qual o TOptions se associará.

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

O tipo de opções que estão sendo configuradas.

Parâmetros

services
IServiceCollection

O IServiceCollection ao qual adicionar os serviços.

name
String

O nome da instância de opções.

config
IConfiguration

A configuração que está sendo associada.

configureBinder
Action<BinderOptions>

Usado para configurar o BinderOptions.

Retornos

O IServiceCollection para que chamadas adicionais possam ser encadeadas.

Aplica-se a