Bagikan melalui


HostingHostBuilderExtensions.UseContentRoot(IHostBuilder, String) Metode

Definisi

Menentukan direktori akar konten yang akan digunakan oleh host.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ UseContentRoot(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, System::String ^ contentRoot);
public static Microsoft.Extensions.Hosting.IHostBuilder UseContentRoot (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, string contentRoot);
static member UseContentRoot : Microsoft.Extensions.Hosting.IHostBuilder * string -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function UseContentRoot (hostBuilder As IHostBuilder, contentRoot As String) As IHostBuilder

Parameter

hostBuilder
IHostBuilder

untuk IHostBuilder mengonfigurasi.

contentRoot
String

Jalur ke direktori akar aplikasi.

Mengembalikan

IHostBuilder.

Berlaku untuk