ContextualOptionsServiceCollectionExtensions.ConfigureAll 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
ConfigureAll<TOptions>(IServiceCollection, Action<IOptionsContext,TOptions>) |
Inscrit une action permettant de configurer toutes les instances d’un type particulier d’options. |
ConfigureAll<TOptions>(IServiceCollection, Func<IOptionsContext,CancellationToken,ValueTask<IConfigureContextualOptions<TOptions>>>) |
Inscrit une action permettant de configurer toutes les instances d’un type particulier d’options. |
ConfigureAll<TOptions>(IServiceCollection, Action<IOptionsContext,TOptions>)
Inscrit une action permettant de configurer toutes les instances d’un type particulier d’options.
public:
generic <typename TOptions>
where TOptions : class[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ ConfigureAll(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Options::Contextual::IOptionsContext ^, TOptions> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureAll<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Options.Contextual.IOptionsContext,TOptions> configure) where TOptions : class;
static member ConfigureAll : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Options.Contextual.IOptionsContext, 'Options (requires 'Options : null)> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function ConfigureAll(Of TOptions As Class) (services As IServiceCollection, configure As Action(Of IOptionsContext, TOptions)) As IServiceCollection
Paramètres de type
- TOptions
Type d’options à configurer.
Paramètres
- services
- IServiceCollection
IServiceCollection auquel ajouter les services.
- configure
- Action<IOptionsContext,TOptions>
Action utilisée pour configurer les options.
Retours
la valeur de la propriété services
;
S’applique à
ConfigureAll<TOptions>(IServiceCollection, Func<IOptionsContext,CancellationToken,ValueTask<IConfigureContextualOptions<TOptions>>>)
Inscrit une action permettant de configurer toutes les instances d’un type particulier d’options.
public:
generic <typename TOptions>
where TOptions : class[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ ConfigureAll(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Func<Microsoft::Extensions::Options::Contextual::IOptionsContext ^, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<Microsoft::Extensions::Options::Contextual::Provider::IConfigureContextualOptions<TOptions> ^>> ^ loadOptions);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureAll<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Func<Microsoft.Extensions.Options.Contextual.IOptionsContext,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<Microsoft.Extensions.Options.Contextual.Provider.IConfigureContextualOptions<TOptions>>> loadOptions) where TOptions : class;
static member ConfigureAll : Microsoft.Extensions.DependencyInjection.IServiceCollection * Func<Microsoft.Extensions.Options.Contextual.IOptionsContext, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<Microsoft.Extensions.Options.Contextual.Provider.IConfigureContextualOptions<'Options>>> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function ConfigureAll(Of TOptions As Class) (services As IServiceCollection, loadOptions As Func(Of IOptionsContext, CancellationToken, ValueTask(Of IConfigureContextualOptions(Of TOptions)))) As IServiceCollection
Paramètres de type
- TOptions
Type d’options à configurer.
Paramètres
- services
- IServiceCollection
IServiceCollection auquel ajouter les services.
- loadOptions
- Func<IOptionsContext,CancellationToken,ValueTask<IConfigureContextualOptions<TOptions>>>
Action utilisée pour configurer les options.
Retours
la valeur de la propriété services
;