Język

HostingHostBuilderExtensions.UseContentRoot(IHostBuilder, String) Metoda

Definicja

Określa katalog główny zawartości, który ma być używany przez hosta. Aby uniknąć zastępowania katalogu głównego zawartości przez wartość domyślną, upewnij się, że jest to wywoływane po skonfigurowaniu wartości domyślnych.

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

Parametry

hostBuilder
IHostBuilder

Element do skonfigurowania IHostBuilder .

contentRoot
String

Ścieżka do katalogu głównego aplikacji.

Zwraca

IHostBuilder.

Dotyczy