WebApplicationFactory<TEntryPoint>.CreateHost(IHostBuilder) 方法

定义

IHost使用 中的builder启动应用程序创建 。 仅对使用 IHostBuilder的应用程序调用。 将改用CreateServer(IWebHostBuilder)基于 的应用程序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具有启动应用程序的 。

适用于