WebHostBuilderExtensions.ConfigureTestServices 方法

定义

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

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureTestServices(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ webHostBuilder, Action<Microsoft::Extensions::DependencyInjection::IServiceCollection ^> ^ servicesConfiguration);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureTestServices (this Microsoft.AspNetCore.Hosting.IWebHostBuilder webHostBuilder, Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> servicesConfiguration);
static member ConfigureTestServices : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function ConfigureTestServices (webHostBuilder As IWebHostBuilder, servicesConfiguration As Action(Of IServiceCollection)) As IWebHostBuilder

参数

webHostBuilder
IWebHostBuilder

IWebHostBuilder

servicesConfiguration
Action<IServiceCollection>

Action 服务注册到 的 IServiceCollection

返回

IWebHostBuilder

适用于