Bagikan melalui


WebHostBuilderExtensions.UseDefaultServiceProvider Metode

Definisi

Overload

UseDefaultServiceProvider(IWebHostBuilder, Action<WebHostBuilderContext,ServiceProviderOptions>)

Mengonfigurasi penyedia layanan default

UseDefaultServiceProvider(IWebHostBuilder, Action<ServiceProviderOptions>)

Mengonfigurasi penyedia layanan default

UseDefaultServiceProvider(IWebHostBuilder, Action<WebHostBuilderContext,ServiceProviderOptions>)

Sumber:
WebHostBuilderExtensions.cs
Sumber:
WebHostBuilderExtensions.cs
Sumber:
WebHostBuilderExtensions.cs

Mengonfigurasi penyedia layanan default

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseDefaultServiceProvider(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, Microsoft::Extensions::DependencyInjection::ServiceProviderOptions ^> ^ configure);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseDefaultServiceProvider (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> configure);
static member UseDefaultServiceProvider : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseDefaultServiceProvider (hostBuilder As IWebHostBuilder, configure As Action(Of WebHostBuilderContext, ServiceProviderOptions)) As IWebHostBuilder

Parameter

hostBuilder
IWebHostBuilder

untuk IWebHostBuilder mengonfigurasi.

configure
Action<WebHostBuilderContext,ServiceProviderOptions>

Panggilan balik yang digunakan untuk mengonfigurasi ServiceProviderOptions untuk default IServiceProvider.

Mengembalikan

IWebHostBuilder.

Berlaku untuk

UseDefaultServiceProvider(IWebHostBuilder, Action<ServiceProviderOptions>)

Sumber:
WebHostBuilderExtensions.cs
Sumber:
WebHostBuilderExtensions.cs
Sumber:
WebHostBuilderExtensions.cs

Mengonfigurasi penyedia layanan default

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseDefaultServiceProvider(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::DependencyInjection::ServiceProviderOptions ^> ^ configure);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseDefaultServiceProvider (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> configure);
static member UseDefaultServiceProvider : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseDefaultServiceProvider (hostBuilder As IWebHostBuilder, configure As Action(Of ServiceProviderOptions)) As IWebHostBuilder

Parameter

hostBuilder
IWebHostBuilder

untuk IWebHostBuilder mengonfigurasi.

configure
Action<ServiceProviderOptions>

Panggilan balik yang digunakan untuk mengonfigurasi ServiceProviderOptions untuk default IServiceProvider.

Mengembalikan

IWebHostBuilder.

Berlaku untuk