共用方式為


FileConfigurationExtensions.SetFileProvider 方法

定義

設定要用於檔案型提供者的預設 IFileProvider

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ SetFileProvider(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, Microsoft::Extensions::FileProviders::IFileProvider ^ fileProvider);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder SetFileProvider (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Microsoft.Extensions.FileProviders.IFileProvider fileProvider);
static member SetFileProvider : Microsoft.Extensions.Configuration.IConfigurationBuilder * Microsoft.Extensions.FileProviders.IFileProvider -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function SetFileProvider (builder As IConfigurationBuilder, fileProvider As IFileProvider) As IConfigurationBuilder

參數

builder
IConfigurationBuilder

要新增的目標 IConfigurationBuilder

fileProvider
IFileProvider

預設檔案提供者執行個體。

傳回

IConfigurationBuilder

適用於