WebApplicationFactory<TEntryPoint>.CreateWebHostBuilder 方法

定义

IWebHostBuilder创建用于设置 的 TestServer

protected:
 virtual Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ CreateWebHostBuilder();
protected virtual Microsoft.AspNetCore.Hosting.IWebHostBuilder CreateWebHostBuilder ();
protected virtual Microsoft.AspNetCore.Hosting.IWebHostBuilder? CreateWebHostBuilder ();
abstract member CreateWebHostBuilder : unit -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
override this.CreateWebHostBuilder : unit -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Protected Overridable Function CreateWebHostBuilder () As IWebHostBuilder

返回

一个 IWebHostBuilder 实例。

注解

此方法的默认实现查找 public static IWebHostBuilder CreateWebHostBuilder(string[] args) 在 程序集 TEntryPoint 的入口点上定义的方法,并调用它作为参数传递空字符串数组。

适用于