IHostBuilder.ConfigureContainer<TContainerBuilder> 方法

定义

允许配置实例化的依赖项容器。 可多次进行调用,并累加结果。

public:
generic <typename TContainerBuilder>
 Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureContainer(Action<Microsoft::Extensions::Hosting::HostBuilderContext ^, TContainerBuilder> ^ configureDelegate);
public Microsoft.Extensions.Hosting.IHostBuilder ConfigureContainer<TContainerBuilder> (Action<Microsoft.Extensions.Hosting.HostBuilderContext,TContainerBuilder> configureDelegate);
abstract member ConfigureContainer : Action<Microsoft.Extensions.Hosting.HostBuilderContext, 'ContainerBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
Public Function ConfigureContainer(Of TContainerBuilder) (configureDelegate As Action(Of HostBuilderContext, TContainerBuilder)) As IHostBuilder

类型参数

TContainerBuilder

生成器的类型。

参数

configureDelegate
Action<HostBuilderContext,TContainerBuilder>

用于配置生成器的委托。

返回

用于链接的相同 IHostBuilder 实例。

适用于