Udostępnij za pośrednictwem


HostingHostBuilderExtensions.UseDefaultServiceProvider Method

Definition

Overloads

UseDefaultServiceProvider(IHostBuilder, Action<HostBuilderContext,ServiceProviderOptions>)

Specifies the IServiceProvider to be the default one.

UseDefaultServiceProvider(IHostBuilder, Action<ServiceProviderOptions>)

Specifies the IServiceProvider to be the default one.

UseDefaultServiceProvider(IHostBuilder, Action<HostBuilderContext,ServiceProviderOptions>)

Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs

Specifies 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>)

Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs

Specifies 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.

Applies to