Bagikan melalui


ContextualOptionsServiceCollectionExtensions.ConfigureAll Metode

Definisi

Overload

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

Mendaftarkan tindakan yang digunakan untuk mengonfigurasi semua instans dari jenis opsi tertentu.

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

Mendaftarkan tindakan yang digunakan untuk mengonfigurasi semua instans dari jenis opsi tertentu.

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

Sumber:
ContextualOptionsServiceCollectionExtensions.cs

Mendaftarkan tindakan yang digunakan untuk mengonfigurasi semua instans dari jenis opsi tertentu.

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

Jenis parameter

TOptions

Jenis opsi yang akan dikonfigurasi.

Parameter

services
IServiceCollection

untuk IServiceCollection menambahkan layanan.

configure
Action<IOptionsContext,TOptions>

Tindakan yang digunakan untuk mengonfigurasi opsi.

Mengembalikan

Nilai dari services.

Berlaku untuk

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

Sumber:
ContextualOptionsServiceCollectionExtensions.cs

Mendaftarkan tindakan yang digunakan untuk mengonfigurasi semua instans dari jenis opsi tertentu.

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

Jenis parameter

TOptions

Jenis opsi yang akan dikonfigurasi.

Parameter

services
IServiceCollection

untuk IServiceCollection menambahkan layanan.

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

Tindakan yang digunakan untuk mengonfigurasi opsi.

Mengembalikan

Nilai dari services.

Berlaku untuk