Share via


WebHostBuilderExtensions.UseDefaultServiceProvider Method

Definition

Overloads

UseDefaultServiceProvider(IWebHostBuilder, Action<WebHostBuilderContext,ServiceProviderOptions>)

Configures the default service provider

UseDefaultServiceProvider(IWebHostBuilder, Action<ServiceProviderOptions>)

Configures the default service provider

UseDefaultServiceProvider(IWebHostBuilder, Action<WebHostBuilderContext,ServiceProviderOptions>)

Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs

Configures the default service provider

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

Parameters

hostBuilder
IWebHostBuilder

The IWebHostBuilder to configure.

configure
Action<WebHostBuilderContext,ServiceProviderOptions>

A callback used to configure the ServiceProviderOptions for the default IServiceProvider.

Returns

The IWebHostBuilder.

Applies to

UseDefaultServiceProvider(IWebHostBuilder, Action<ServiceProviderOptions>)

Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs
Source:
WebHostBuilderExtensions.cs

Configures the default service provider

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

Parameters

hostBuilder
IWebHostBuilder

The IWebHostBuilder to configure.

configure
Action<ServiceProviderOptions>

A callback used to configure the ServiceProviderOptions for the default IServiceProvider.

Returns

The IWebHostBuilder.

Applies to