共用方式為


WebHostBuilderExtensions.ConfigureTestContainer<TContainer> 方法

定義

使用 中 servicesConfiguration 提供的服務來 IWebHostBuilder 設定 實例。

public:
generic <typename TContainer>
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureTestContainer(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ webHostBuilder, Action<TContainer> ^ servicesConfiguration);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureTestContainer<TContainer> (this Microsoft.AspNetCore.Hosting.IWebHostBuilder webHostBuilder, Action<TContainer> servicesConfiguration);
static member ConfigureTestContainer : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<'Container> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function ConfigureTestContainer(Of TContainer) (webHostBuilder As IWebHostBuilder, servicesConfiguration As Action(Of TContainer)) As IWebHostBuilder

類型參數

TContainer

服務描述項的集合。

參數

webHostBuilder
IWebHostBuilder

IWebHostBuilder

servicesConfiguration
Action<TContainer>

Action 將服務註冊到 TContainer

傳回

適用於