共用方式為


HostBuilder.ConfigureContainer<TContainerBuilder> 方法

定義

能夠設定具現化的相依性容器。 這可以呼叫多次,結果會進行累加。

public:
generic <typename TContainerBuilder>
 virtual 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
override this.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>

此委派可設定將用來為主機建構 IConfigurationIConfigurationBuilder

傳回

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

實作

適用於