共用方式為


FileConfigurationExtensions.SetBasePath(IConfigurationBuilder, String) 方法

定義

將檔案型提供者之 FileProvider 設定為具有基底路徑的 PhysicalFileProvider。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ SetBasePath(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, System::String ^ basePath);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder SetBasePath (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string basePath);
static member SetBasePath : Microsoft.Extensions.Configuration.IConfigurationBuilder * string -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function SetBasePath (builder As IConfigurationBuilder, basePath As String) As IConfigurationBuilder

參數

builder
IConfigurationBuilder

要新增的目標 IConfigurationBuilder

basePath
String

檔案型提供者的絕對路徑。

傳回

IConfigurationBuilder

適用於