共用方式為


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 執行個體。

適用於