OptionsConfigurationServiceCollectionExtensions.Configure Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
Configure<TOptions>(IServiceCollection, IConfiguration) |
Inscrit une instance de configuration à laquelle |
Configure<TOptions>(IServiceCollection, IConfiguration, Action<BinderOptions>) |
Inscrit une instance de configuration à laquelle TOptions sera lié. |
Configure<TOptions>(IServiceCollection, String, IConfiguration) |
Inscrit une instance de configuration à laquelle TOptions sera lié. |
Configure<TOptions>(IServiceCollection, String, IConfiguration, Action<BinderOptions>) |
Inscrit une instance de configuration à laquelle TOptions sera lié. |
Configure<TOptions>(IServiceCollection, IConfiguration)
Inscrit une instance de configuration à laquelle TOptions
va se lier, et met à jour les options quand la configuration change.
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
Paramètres de type
- TOptions
Type d’options en cours de configuration.
Paramètres
- services
- IServiceCollection
IServiceCollection auquel ajouter les services.
- config
- IConfiguration
Configuration en cours de liaison.
Retours
IServiceCollection à utiliser pour chaîner des appels supplémentaires.
S’applique à
Configure<TOptions>(IServiceCollection, IConfiguration, Action<BinderOptions>)
Inscrit une instance de configuration à laquelle TOptions sera lié.
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
Paramètres de type
- TOptions
Type d’options en cours de configuration.
Paramètres
- services
- IServiceCollection
IServiceCollection auquel ajouter les services.
- config
- IConfiguration
Configuration en cours de liaison.
- configureBinder
- Action<BinderOptions>
Utilisé pour configurer BinderOptions.
Retours
IServiceCollection à utiliser pour chaîner des appels supplémentaires.
S’applique à
Configure<TOptions>(IServiceCollection, String, IConfiguration)
Inscrit une instance de configuration à laquelle TOptions sera lié.
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
Paramètres de type
- TOptions
Type d’options en cours de configuration.
Paramètres
- services
- IServiceCollection
IServiceCollection auquel ajouter les services.
- name
- String
Nom de l’instance d’options.
- config
- IConfiguration
Configuration en cours de liaison.
Retours
IServiceCollection à utiliser pour chaîner des appels supplémentaires.
S’applique à
Configure<TOptions>(IServiceCollection, String, IConfiguration, Action<BinderOptions>)
Inscrit une instance de configuration à laquelle TOptions sera lié.
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
Paramètres de type
- TOptions
Type d’options en cours de configuration.
Paramètres
- services
- IServiceCollection
IServiceCollection auquel ajouter les services.
- name
- String
Nom de l’instance d’options.
- config
- IConfiguration
Configuration en cours de liaison.
- configureBinder
- Action<BinderOptions>
Utilisé pour configurer BinderOptions.
Retours
IServiceCollection à utiliser pour chaîner des appels supplémentaires.