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

适用于