Udostępnij przez


HostingAbstractionsWebHostBuilderExtensions.PreferHostingUrls Metoda

Definicja

Określ, czy host powinien nasłuchiwać adresów URL skonfigurowanych na IWebHostBuilder zamiast tych skonfigurowanych w systemie IServer.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ PreferHostingUrls(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, bool preferHostingUrls);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder PreferHostingUrls (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, bool preferHostingUrls);
static member PreferHostingUrls : Microsoft.AspNetCore.Hosting.IWebHostBuilder * bool -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function PreferHostingUrls (hostBuilder As IWebHostBuilder, preferHostingUrls As Boolean) As IWebHostBuilder

Parametry

hostBuilder
IWebHostBuilder

Element do skonfigurowania IWebHostBuilder .

preferHostingUrls
Boolean

true aby preferować adresy URL skonfigurowane w obiekcie IWebHostBuilder; w przeciwnym razie false.

Zwraca

Element IWebHostBuilder.

Dotyczy