HostingHostBuilderExtensions.UseContentRoot(IHostBuilder, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
指定要由主機使用的內容根目錄。
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
參數
- hostBuilder
- IHostBuilder
要設定的 IHostBuilder。
- contentRoot
- String
應用程式根目錄的路徑。