WebHostBuilderExtensions.UseDefaultServiceProvider Метод

Определение

Перегрузки

UseDefaultServiceProvider(IWebHostBuilder, Action<WebHostBuilderContext,ServiceProviderOptions>)

Настраивает поставщик служб по умолчанию

UseDefaultServiceProvider(IWebHostBuilder, Action<ServiceProviderOptions>)

Настраивает поставщик служб по умолчанию

UseDefaultServiceProvider(IWebHostBuilder, Action<WebHostBuilderContext,ServiceProviderOptions>)

Настраивает поставщик служб по умолчанию

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

Параметры

hostBuilder
IWebHostBuilder

IWebHostBuilder для настройки.

configure
Action<WebHostBuilderContext,ServiceProviderOptions>

Обратный вызов, используемый для настройки ServiceProviderOptions для значения по умолчанию IServiceProvider .

Возвращаемое значение

IWebHostBuilder

IWebHostBuilder.

Применяется к

UseDefaultServiceProvider(IWebHostBuilder, Action<ServiceProviderOptions>)

Настраивает поставщик служб по умолчанию

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

Параметры

hostBuilder
IWebHostBuilder

IWebHostBuilder для настройки.

configure
Action<ServiceProviderOptions>

Обратный вызов, используемый для настройки ServiceProviderOptions для значения по умолчанию IServiceProvider .

Возвращаемое значение

IWebHostBuilder

IWebHostBuilder.

Применяется к