Sdílet prostřednictvím


HostingAbstractionsWebHostBuilderExtensions.PreferHostingUrls Metoda

Definice

Určete, jestli má hostitel naslouchat adresám URL nakonfigurovaným na IWebHostBuilder místo adres nakonfigurovaných na 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

Konfigurace IWebHostBuilder .

preferHostingUrls
Boolean

true a upřednostňovat adresy URL nakonfigurované na IWebHostBuilder; jinak false.

Návraty

Hodnota IWebHostBuilder

Platí pro