HostingAbstractionsWebHostBuilderExtensions.UseContentRoot 方法

定义

指定要由 Web 主机使用的内容根目录。

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

参数

hostBuilder
IWebHostBuilder

要配置的 IWebHostBuilder

contentRoot
String

应用程序的根目录路径。

返回

IWebHostBuilder

适用于