Table of Contents

Class ConfigurationProvider

Namespace
Acuit.Pinpoint.Configuration
Assembly
Acuit.Pinpoint.Configuration.dll

Base helper class for implementing an IConfigurationProvider

public abstract class ConfigurationProvider : IConfigurationProvider
Inheritance
ConfigurationProvider
Implements
Derived
Inherited Members

Constructors

ConfigurationProvider()

Initializes a new IConfigurationProvider

protected ConfigurationProvider()

Properties

Data

The configuration key value pairs for this provider.

protected IDictionary<string, string> Data { get; set; }

Property Value

IDictionary<string, string>

Methods

GetChildKeys(IEnumerable<string>, string)

Returns the list of keys that this provider has.

public virtual IEnumerable<string> GetChildKeys(IEnumerable<string> earlierKeys, string parentPath)

Parameters

earlierKeys IEnumerable<string>

The earlier keys that other providers contain.

parentPath string

The path for the parent IConfiguration.

Returns

IEnumerable<string>

The list of keys for this provider.

GetReloadToken()

Returns a IChangeToken that can be used to listen when this provider is reloaded.

public IChangeToken GetReloadToken()

Returns

IChangeToken

Load()

Loads (or reloads) the data for this provider.

public virtual void Load()

OnReload()

Triggers the reload change token and creates a new one.

protected void OnReload()

Set(string, string)

Sets a value for a given key.

public virtual void Set(string key, string value)

Parameters

key string

The configuration key to set.

value string

The value to set.

TryGet(string, out 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)

Parameters

key string

The key to lookup.

value string

The value found at key if one is found.

Returns

bool

True if key has a value, false otherwise.