WebApplicationFactory<TEntryPoint>.CreateServer(IWebHostBuilder) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates the TestServer with the bootstrapped application in builder
.
This is only called for applications using IWebHostBuilder. Applications based on
IHostBuilder will use CreateHost(IHostBuilder) instead.
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
Parameters
- builder
- IWebHostBuilder
The IWebHostBuilder used to create the server.
Returns
The TestServer with the bootstrapped application.