Condividi tramite


ContextualOptionsServiceCollectionExtensions.ConfigureAll Metodo

Definizione

Overload

ConfigureAll<TOptions>(IServiceCollection, Action<IOptionsContext,TOptions>)

Registra un'azione usata per configurare tutte le istanze di un particolare tipo di opzioni.

ConfigureAll<TOptions>(IServiceCollection, Func<IOptionsContext,CancellationToken,ValueTask<IConfigureContextualOptions<TOptions>>>)

Registra un'azione usata per configurare tutte le istanze di un particolare tipo di opzioni.

ConfigureAll<TOptions>(IServiceCollection, Action<IOptionsContext,TOptions>)

Origine:
ContextualOptionsServiceCollectionExtensions.cs

Registra un'azione usata per configurare tutte le istanze di un particolare tipo di opzioni.

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

Parametri di tipo

TOptions

Tipo di opzioni da configurare.

Parametri

services
IServiceCollection

Oggetto IServiceCollection in cui aggiungere i servizi.

configure
Action<IOptionsContext,TOptions>

Azione usata per configurare le opzioni.

Restituisce

Valore di services.

Si applica a

ConfigureAll<TOptions>(IServiceCollection, Func<IOptionsContext,CancellationToken,ValueTask<IConfigureContextualOptions<TOptions>>>)

Origine:
ContextualOptionsServiceCollectionExtensions.cs

Registra un'azione usata per configurare tutte le istanze di un particolare tipo di opzioni.

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

Parametri di tipo

TOptions

Tipo di opzioni da configurare.

Parametri

services
IServiceCollection

Oggetto IServiceCollection in cui aggiungere i servizi.

loadOptions
Func<IOptionsContext,CancellationToken,ValueTask<IConfigureContextualOptions<TOptions>>>

Azione usata per configurare le opzioni.

Restituisce

Valore di services.

Si applica a