C# Class Innovatian.Configuration.AbstractConfigurationSource

AbstractConfigurationSource provides a skeleton implementation of IConfigurationSource which provides all merging, adding, and expanding features. Inheritors provide implementation specific loading and saving functionality.
Inheritance: IConfigurationSource
Mostrar archivo Open project: idavis/innovatian.configuration

Public Methods

Method Description
Add ( IConfigurationSection section ) : void

Adds a named configuration section to this source. If the section name is already in this source, the values from the new source will override and be added.

Clear ( ) : void

Clears the sections and sources of this instance.

ExpandKeyValues ( ) : void

Processes all sections expanding configuration variables and saving the new values.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that iterates through the collection.

Merge ( ) : void

Merges the sources into this instance. Each source's sections will be added and merged. If the sources contain duplicate sections, they will be merged.

Reload ( ) : void

Discards all sections and merged sources and reloads a fresh set of settings.

Save ( ) : void

Saves all sections. All data merged from other merged sources will be included.

Protected Methods

Method Description
AbstractConfigurationSource ( ) : System

Initializes a new instance of the AbstractConfigurationSource class.

OnPropertyChanged ( string section, string key ) : void

Called when [property changed].

Private Methods

Method Description
Expand ( IConfigurationSection section, string key ) : string
ExpandValue ( IConfigurationSection section, string search ) : string
GetResultFromCurrentSection ( string keyName, IConfigurationSection section ) : string
GetResultFromExternalSection ( string sectionName, string keyName ) : string
IEnumerable ( ) : IEnumerator

Returns an enumerator that iterates through a collection.

MergeSectionIntoSource ( IConfigurationSection section ) : void

Method Details

AbstractConfigurationSource() protected method

Initializes a new instance of the AbstractConfigurationSource class.
protected AbstractConfigurationSource ( ) : System
return System

Add() public method

Adds a named configuration section to this source. If the section name is already in this source, the values from the new source will override and be added.
public Add ( IConfigurationSection section ) : void
section IConfigurationSection The named section to add.
return void

Clear() public method

Clears the sections and sources of this instance.
public Clear ( ) : void
return void

ExpandKeyValues() public method

Processes all sections expanding configuration variables and saving the new values.
public ExpandKeyValues ( ) : void
return void

GetEnumerator() public method

Returns an enumerator that iterates through the collection.
public GetEnumerator ( ) : IEnumerator
return IEnumerator

Merge() public method

Merges the sources into this instance. Each source's sections will be added and merged. If the sources contain duplicate sections, they will be merged.
public Merge ( ) : void
return void

OnPropertyChanged() protected method

Called when [property changed].
protected OnPropertyChanged ( string section, string key ) : void
section string The section.
key string The key.
return void

Reload() public abstract method

Discards all sections and merged sources and reloads a fresh set of settings.
public abstract Reload ( ) : void
return void

Save() public abstract method

Saves all sections. All data merged from other merged sources will be included.
public abstract Save ( ) : void
return void