HostingHostBuilderExtensions.UseContentRoot(IHostBuilder, String) 方法

定義

指定主機要使用的內容根目錄。

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

應用程式根目錄的路徑。

傳回

IHostBuilder

IHostBuilder

適用於