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

适用于