HostingHostBuilderExtensions.UseDefaultServiceProvider Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
UseDefaultServiceProvider(IHostBuilder, Action<HostBuilderContext,ServiceProviderOptions>) |
Specify the IServiceProvider to be the default one. |
UseDefaultServiceProvider(IHostBuilder, Action<ServiceProviderOptions>) |
Specify the IServiceProvider to be the default one. |
UseDefaultServiceProvider(IHostBuilder, Action<HostBuilderContext,ServiceProviderOptions>)
Specify the IServiceProvider to be the default one.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Hosting::IHostBuilder ^ UseDefaultServiceProvider(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Hosting::HostBuilderContext ^, Microsoft::Extensions::DependencyInjection::ServiceProviderOptions ^> ^ configure);
public static Microsoft.Extensions.Hosting.IHostBuilder UseDefaultServiceProvider (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Hosting.HostBuilderContext,Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> configure);
static member UseDefaultServiceProvider : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function UseDefaultServiceProvider (hostBuilder As IHostBuilder, configure As Action(Of HostBuilderContext, ServiceProviderOptions)) As IHostBuilder
Parameters
- hostBuilder
- IHostBuilder
The IHostBuilder to configure.
- configure
- Action<HostBuilderContext,ServiceProviderOptions>
The delegate that configures the IServiceProvider.
Returns
The IHostBuilder.
Applies to
UseDefaultServiceProvider(IHostBuilder, Action<ServiceProviderOptions>)
Specify the IServiceProvider to be the default one.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Hosting::IHostBuilder ^ UseDefaultServiceProvider(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::DependencyInjection::ServiceProviderOptions ^> ^ configure);
public static Microsoft.Extensions.Hosting.IHostBuilder UseDefaultServiceProvider (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> configure);
static member UseDefaultServiceProvider : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.DependencyInjection.ServiceProviderOptions> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function UseDefaultServiceProvider (hostBuilder As IHostBuilder, configure As Action(Of ServiceProviderOptions)) As IHostBuilder
Parameters
- hostBuilder
- IHostBuilder
The IHostBuilder to configure.
- configure
- Action<ServiceProviderOptions>
The delegate that configures the IServiceProvider.
Returns
The IHostBuilder.