ConfigurationProvider ConfigurationProvider Class

Base helper class for implementing an IConfigurationProvider

Syntax

Declaration

public abstract class ConfigurationProvider : IConfigurationProviderPublic MustInherit Class ConfigurationProvider
    Implements IConfigurationProvider

Inheritance Hierarchy

  • System.Object
    System.Object
  • ConfigurationProvider
    ConfigurationProvider

Inherited Members

Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone(),
MemberwiseClone(),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
ToString()
ToString()

Constructors summary

Initializes a new IConfigurationProvider

Properties summary

The configuration key value pairs for this provider.

Methods summary

Returns the list of keys that this provider has.
Returns a IChangeToken that can be used to listen when this provider is reloaded.
Loads (or reloads) the data for this provider.
Triggers the reload change token and creates a new one.
Sets a value for a given key.
Attempts to find a value with the given key, returns true if one is found, false otherwise.

Constructors

  • ConfigurationProvider()
    ConfigurationProvider()
    Initializes a new IConfigurationProvider
    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)

    Property Value

    • System.Collections.Generic.IDictionary<TKey, TValue><System.String, System.String>
      System.Collections.Generic.IDictionary<TKey, TValue>(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
      System.Collections.Generic.IEnumerable<T><System.String>
      System.Collections.Generic.IEnumerable<T>(Of System.String)
      The earlier keys that other providers contain.
    • parentPath
      System.String
      System.String
      The path for the parent IConfiguration.

    Returns

    • System.Collections.Generic.IEnumerable<T><System.String>
      System.Collections.Generic.IEnumerable<T>(Of System.String)
      The list of keys for this provider.
  • GetReloadToken()
    GetReloadToken()
    Returns a IChangeToken that can be used to listen when this provider is reloaded.
    public IChangeToken GetReloadToken()Public Function GetReloadToken As IChangeToken

    Returns

  • 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.

Details

Assembly

Microsoft.Extensions.Configuration.dll