IConfigurationProvider Interface¶
Provides configuration key/values for an application.
- Namespace
Microsoft.Extensions.Configuration
- Assemblies
- Microsoft.Extensions.Configuration.Abstractions
Syntax¶
public interface IConfigurationProvider
-
interface
Microsoft.Extensions.Configuration.
IConfigurationProvider
Methods¶
-
GetChildKeys
(System.Collections.Generic.IEnumerable<System.String>, System.String)¶ Returns the immediate descendant configuration keys for a given parent path based on this
Microsoft.Extensions.Configuration.IConfigurationProvider
‘s data and the set of keys returned by all the precedingMicrosoft.Extensions.Configuration.IConfigurationProvider
s.Arguments: - earlierKeys (System.Collections.Generic.IEnumerable<System.String>) – The child keys returned by the preceding providers for the same parent path.
- parentPath (System.String) – The parent path.
Return type: System.Collections.Generic.IEnumerable<System.String>
Returns: The child keys.
IEnumerable<string> GetChildKeys(IEnumerable<string> earlierKeys, string parentPath)
-
GetReloadToken
()¶ Returns a change token if this provider supports change tracking, null otherwise.
Return type: Microsoft.Extensions.Primitives.IChangeToken IChangeToken GetReloadToken()
-
Load
()¶ Loads configuration values from the source represented by this
Microsoft.Extensions.Configuration.IConfigurationProvider
.void Load()
-
Set
(System.String, System.String)¶ Sets a configuration value for the specified key.
Arguments: - key (System.String) – The key.
- value (System.String) – The value.
void Set(string key, string value)
-
TryGet
(System.String, out System.String)¶ Tries to get a configuration value for the specified key.
Arguments: - key (System.String) – The key.
- value (System.String) – The value.
Return type: System.Boolean
Returns: <code>True</code> if a value for the specified key was found, otherwise <code>false</code>.
bool TryGet(string key, out string value)
-