共用方式為


HostingAbstractionsWebHostBuilderExtensions.UseWebRoot 方法

定義

指定 Web 主機要使用的 Webroot 目錄。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseWebRoot(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, System::String ^ webRoot);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseWebRoot (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, string webRoot);
static member UseWebRoot : Microsoft.AspNetCore.Hosting.IWebHostBuilder * string -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseWebRoot (hostBuilder As IWebHostBuilder, webRoot As String) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 IWebHostBuilder

webRoot
String

Web 服務器所使用的根目錄路徑。

傳回

IWebHostBuilder

適用於