Bagikan melalui


HostingAbstractionsWebHostBuilderExtensions.PreferHostingUrls Metode

Definisi

Tunjukkan apakah host harus mendengarkan URL yang dikonfigurasi pada IWebHostBuilder alih-alih yang dikonfigurasi pada 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

Parameter

hostBuilder
IWebHostBuilder

untuk IWebHostBuilder mengonfigurasi.

preferHostingUrls
Boolean

true untuk lebih memilih URL yang dikonfigurasi pada IWebHostBuilder; jika tidak false.

Mengembalikan

IWebHostBuilder.

Berlaku untuk