Condividi tramite


OptionsConfigurationServiceCollectionExtensions.Configure Metodo

Definizione

Overload

Configure<TOptions>(IServiceCollection, IConfiguration)

Registra un'istanza di configurazione per l'associazione di TOptions e aggiorna le opzioni quando la configurazione cambia.

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

Registra un'istanza della configurazione in base a cui TOptions eseguirà l'associazione.

Configure<TOptions>(IServiceCollection, String, IConfiguration)

Registra un'istanza della configurazione in base a cui TOptions eseguirà l'associazione.

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

Registra un'istanza della configurazione in base a cui TOptions eseguirà l'associazione.

Configure<TOptions>(IServiceCollection, IConfiguration)

Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs

Registra un'istanza di configurazione per l'associazione di TOptions e aggiorna le opzioni quando la configurazione cambia.

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

Parametri di tipo

TOptions

Tipo di opzioni da configurare.

Parametri

services
IServiceCollection

Oggetto IServiceCollection in cui aggiungere i servizi.

config
IConfiguration

Configurazione da associare.

Restituisce

Oggetto IServiceCollection che consente il concatenamento di chiamate aggiuntive.

Si applica a

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

Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs

Registra un'istanza della configurazione in base a cui TOptions eseguirà l'associazione.

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

Parametri di tipo

TOptions

Tipo di opzioni da configurare.

Parametri

services
IServiceCollection

Oggetto IServiceCollection in cui aggiungere i servizi.

config
IConfiguration

Configurazione da associare.

configureBinder
Action<BinderOptions>

Usato per configurare BinderOptions.

Restituisce

Oggetto IServiceCollection che consente il concatenamento di chiamate aggiuntive.

Si applica a

Configure<TOptions>(IServiceCollection, String, IConfiguration)

Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs

Registra un'istanza della configurazione in base a cui TOptions eseguirà l'associazione.

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

Parametri di tipo

TOptions

Tipo di opzioni da configurare.

Parametri

services
IServiceCollection

Oggetto IServiceCollection in cui aggiungere i servizi.

name
String

Nome dell'istanza delle opzioni.

config
IConfiguration

Configurazione da associare.

Restituisce

Oggetto IServiceCollection che consente il concatenamento di chiamate aggiuntive.

Si applica a

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

Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs
Origine:
OptionsConfigurationServiceCollectionExtensions.cs

Registra un'istanza della configurazione in base a cui TOptions eseguirà l'associazione.

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

Parametri di tipo

TOptions

Tipo di opzioni da configurare.

Parametri

services
IServiceCollection

Oggetto IServiceCollection in cui aggiungere i servizi.

name
String

Nome dell'istanza delle opzioni.

config
IConfiguration

Configurazione da associare.

configureBinder
Action<BinderOptions>

Usato per configurare BinderOptions.

Restituisce

Oggetto IServiceCollection che consente il concatenamento di chiamate aggiuntive.

Si applica a