WebHostBuilderExtensions.ConfigureTestContainer<TContainer> 方法

定义

IWebHostBuilder使用 中servicesConfiguration提供的服务配置实例。

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

返回

适用于