Share via


WebApplicationFactory<TEntryPoint>.CreateHostBuilder Method

Definition

Creates a IHostBuilder used to set up TestServer.

protected:
 virtual Microsoft::Extensions::Hosting::IHostBuilder ^ CreateHostBuilder();
protected virtual Microsoft.Extensions.Hosting.IHostBuilder CreateHostBuilder ();
protected virtual Microsoft.Extensions.Hosting.IHostBuilder? CreateHostBuilder ();
abstract member CreateHostBuilder : unit -> Microsoft.Extensions.Hosting.IHostBuilder
override this.CreateHostBuilder : unit -> Microsoft.Extensions.Hosting.IHostBuilder
Protected Overridable Function CreateHostBuilder () As IHostBuilder

Returns

A IHostBuilder instance.

Remarks

The default implementation of this method looks for a public static IHostBuilder CreateHostBuilder(string[] args) method defined on the entry point of the assembly of TEntryPoint and invokes it passing an empty string array as arguments.

Applies to