Configuration​Provider Configuration​Provider Class

Definition

Base helper class for implementing an
public abstract class ConfigurationProvider : IConfigurationProviderPublic MustInherit Class ConfigurationProvider
    Inherits IConfigurationProvider
Inheritance
System.ObjectSystem.Object
ConfigurationProviderConfigurationProvider
Derived

Constructors

ConfigurationProvider() ConfigurationProvider()

Initializes a new
protected ConfigurationProvider()Protected Sub New

Properties

Data Data

The configuration key value pairs for this provider.
protected IDictionary<string, string> Data { get; set; }Protected Property Data As IDictionary(Of String, String)
Value
IDictionary<System.String, System.String> IDictionary(Of System.String, System.String)

Methods

GetChildKeys(IEnumerable<String>, String) GetChildKeys(IEnumerable(Of String), String)

Returns the list of keys that this provider has.
public virtual IEnumerable<string> GetChildKeys(IEnumerable<string> earlierKeys, string parentPath)Public Overridable Function GetChildKeys(earlierKeys As IEnumerable(Of String), parentPath As String) As IEnumerable(Of String)
Parameters
earlierKeys
IEnumerable<System.String> IEnumerable(Of System.String)
The earlier keys that other providers contain.
parentPath
System.String System.String
The path for the parent IConfiguration.
Returns
IEnumerable<System.String> IEnumerable(Of System.String)
The list of keys for this provider.

GetReloadToken() GetReloadToken()

Returns a that can be used to listen when this provider is reloaded.
public IChangeToken GetReloadToken()Public Function GetReloadToken As IChangeToken
Returns
IChangeToken IChangeToken

Load() Load()

Loads (or reloads) the data for this provider.
public virtual void Load()Public Overridable Sub Load

OnReload() OnReload()

Triggers the reload change token and creates a new one.
protected void OnReload()Protected Sub OnReload

Set(String, String) Set(String, String)

Sets a value for a given key.
public virtual void Set(string key, string value)Public Overridable Sub Set(key As String, value As String)
Parameters
key
System.String System.String
The configuration key to set.
value
System.String System.String
The value to set.

TryGet(String, out String) TryGet(String, ByRef String)

Attempts to find a value with the given key, returns true if one is found, false otherwise.
public virtual bool TryGet(string key, out string value)Public Overridable Function TryGet(key As String, ByRef value As String) As Boolean
Parameters
key
System.String System.String
The key to lookup.
value
System.String System.String
The value found at key if one is found.
Returns
System.Boolean System.Boolean
True if key has a value, false otherwise.