Udostępnij przez


WebApplicationFactory<TEntryPoint>.CreateHost(IHostBuilder) Metoda

Definicja

Tworzy element za IHost pomocą bootstrapped aplikacji w pliku builder. Jest to wywoływane tylko w przypadku aplikacji korzystających z polecenia IHostBuilder. Zamiast tego będą używane CreateServer(IWebHostBuilder) aplikacje oparte naIWebHostBuilder.

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

Parametry

builder
IHostBuilder

Element IHostBuilder użyty do utworzenia hosta.

Zwraca

Element IHost z aplikacją bootstrapped.

Dotyczy