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

适用于