IConfigurationProvider 接口

定义

为应用程序提供配置键/值。Provides configuration key/values for an application.

public interface class IConfigurationProvider
public interface IConfigurationProvider
type IConfigurationProvider = interface
Public Interface IConfigurationProvider
派生

方法

GetChildKeys(IEnumerable<String>, String)

基于此 IConfigurationProvider 数据和所有前述 IConfigurationProvider 返回的键集,返回给定父级路径的直接后代配置键。Returns the immediate descendant configuration keys for a given parent path based on this IConfigurationProviders data and the set of keys returned by all the preceding IConfigurationProviders.

GetReloadToken()

如果此提供程序支持更改跟踪,则返回更改令牌,否则返回 null。Returns a change token if this provider supports change tracking, null otherwise.

Load()

从此 IConfigurationProvider 表示的源加载配置值。Loads configuration values from the source represented by this IConfigurationProvider.

Set(String, String)

为指定键设置配置值。Sets a configuration value for the specified key.

TryGet(String, String)

尝试获取指定键的配置值。Tries to get a configuration value for the specified key.

适用于