WebApplicationFactory<TEntryPoint>.CreateHost(IHostBuilder) 方法

定义

IHost在中,用引导的应用程序创建 builder 。 仅对使用的应用程序调用此 IHostBuilder 。 基于的应用程序 IWebHostBuilderCreateServer(IWebHostBuilder) 改为使用。

protected:
 virtual Microsoft::Extensions::Hosting::IHost ^ CreateHost(Microsoft::Extensions::Hosting::IHostBuilder ^ builder);
protected virtual Microsoft.Extensions.Hosting.IHost CreateHost (Microsoft.Extensions.Hosting.IHostBuilder builder);
abstract member CreateHost : Microsoft.Extensions.Hosting.IHostBuilder -> Microsoft.Extensions.Hosting.IHost
override this.CreateHost : Microsoft.Extensions.Hosting.IHostBuilder -> Microsoft.Extensions.Hosting.IHost
Protected Overridable Function CreateHost (builder As IHostBuilder) As IHost

参数

builder
IHostBuilder

IHostBuilder用于创建宿主的。

返回

IHost

IHost带有引导应用程序的。

适用于