WebApplicationFactory<TEntryPoint>.CreateServer(IWebHostBuilder) Método

Definição

Cria o TestServer com o aplicativo inicializado em builder. Isso só é chamado para aplicativos que usam IWebHostBuilder. Em vez disso, os aplicativos baseados IHostBuilder em usarão CreateHost(IHostBuilder) .

protected:
 virtual Microsoft::AspNetCore::TestHost::TestServer ^ CreateServer(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ builder);
protected virtual Microsoft.AspNetCore.TestHost.TestServer CreateServer (Microsoft.AspNetCore.Hosting.IWebHostBuilder builder);
abstract member CreateServer : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.TestHost.TestServer
override this.CreateServer : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.TestHost.TestServer
Protected Overridable Function CreateServer (builder As IWebHostBuilder) As TestServer

Parâmetros

builder
IWebHostBuilder

O IWebHostBuilder usado para criar o servidor.

Retornos

O TestServer com o aplicativo inicializado.

Aplica-se a