Bagikan melalui


OptionsServiceCollectionExtensions.ConfigureAll<TOptions> Metode

Definisi

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<TOptions> ^ configureOptions);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureAll<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<TOptions> configureOptions) where TOptions : class;
static member ConfigureAll : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<'Options (requires 'Options : null)> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function ConfigureAll(Of TOptions As Class) (services As IServiceCollection, configureOptions As Action(Of TOptions)) As IServiceCollection

Jenis parameter

TOptions

Jenis opsi yang akan dikonfigurasi.

Parameter

services
IServiceCollection

untuk IServiceCollection menambahkan layanan.

configureOptions
Action<TOptions>

Tindakan yang digunakan untuk mengonfigurasi opsi.

Mengembalikan

IServiceCollection Sehingga panggilan tambahan dapat dirangkai.

Berlaku untuk