共用方式為


HostBuilder.UseServiceProviderFactory 方法

定義

多載

UseServiceProviderFactory<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder>)

覆寫用來建立服務提供者的 Factory。

UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext,IServiceProviderFactory<TContainerBuilder>>)

覆寫用來建立服務提供者的 Factory。

UseServiceProviderFactory<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder>)

來源:
HostBuilder.cs
來源:
HostBuilder.cs
來源:
HostBuilder.cs
來源:
HostBuilder.cs
來源:
HostBuilder.cs

覆寫用來建立服務提供者的 Factory。

public:
generic <typename TContainerBuilder>
 virtual Microsoft::Extensions::Hosting::IHostBuilder ^ UseServiceProviderFactory(Microsoft::Extensions::DependencyInjection::IServiceProviderFactory<TContainerBuilder> ^ factory);
public Microsoft.Extensions.Hosting.IHostBuilder UseServiceProviderFactory<TContainerBuilder> (Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<TContainerBuilder> factory);
abstract member UseServiceProviderFactory : Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<'ContainerBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
override this.UseServiceProviderFactory : Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<'ContainerBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
Public Function UseServiceProviderFactory(Of TContainerBuilder) (factory As IServiceProviderFactory(Of TContainerBuilder)) As IHostBuilder

類型參數

TContainerBuilder

要建立的產生器型別。

參數

factory
IServiceProviderFactory<TContainerBuilder>

用於建立服務提供者的 Factory。

傳回

用於鏈結的相同 IHostBuilder 執行個體。

實作

適用於

UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext,IServiceProviderFactory<TContainerBuilder>>)

來源:
HostBuilder.cs
來源:
HostBuilder.cs
來源:
HostBuilder.cs
來源:
HostBuilder.cs
來源:
HostBuilder.cs

覆寫用來建立服務提供者的 Factory。

public:
generic <typename TContainerBuilder>
 virtual Microsoft::Extensions::Hosting::IHostBuilder ^ UseServiceProviderFactory(Func<Microsoft::Extensions::Hosting::HostBuilderContext ^, Microsoft::Extensions::DependencyInjection::IServiceProviderFactory<TContainerBuilder> ^> ^ factory);
public Microsoft.Extensions.Hosting.IHostBuilder UseServiceProviderFactory<TContainerBuilder> (Func<Microsoft.Extensions.Hosting.HostBuilderContext,Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<TContainerBuilder>> factory);
abstract member UseServiceProviderFactory : Func<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<'ContainerBuilder>> -> Microsoft.Extensions.Hosting.IHostBuilder
override this.UseServiceProviderFactory : Func<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<'ContainerBuilder>> -> Microsoft.Extensions.Hosting.IHostBuilder
Public Function UseServiceProviderFactory(Of TContainerBuilder) (factory As Func(Of HostBuilderContext, IServiceProviderFactory(Of TContainerBuilder))) As IHostBuilder

類型參數

TContainerBuilder

要建立的產生器型別。

參數

factory
Func<HostBuilderContext,IServiceProviderFactory<TContainerBuilder>>

用於建立服務提供者的 Factory。

傳回

用於鏈結的相同 IHostBuilder 執行個體。

實作

適用於