AP&C API Reference
Static Public Member Functions | List of all members
Apac.Configuration.Config< T > Class Template Reference

The main workhorse for obtaining configuration entities of type T . More...

Static Public Member Functions

static void AddCachedConfig (string definedName, T section)
 Adds the given section to the cache using the given name. More...
 
static void RemoveCachedConfig (string definedName)
 Removes the section with the given name from the cache. More...
 
static T GetConfig ()
 Gets the default configuration section named 'apac' (if defined). More...
 
static T GetConfig (string definedName)
 Gets the default configuration section named

Parameters
definedName.
More...
 
static T GetSection (System.Configuration.Configuration config)
 Gets the default configuration section from the given configuration object. Note that the configuration file is re-parsed every time a section is loaded using the Configuration object. More...
 
static T GetSection (System.Configuration.Configuration config, string definedName)
 Gets the configuration section with the given name from the given configuration object. Note that the configuration file is re-parsed every time a section is loaded using the Configuration object. More...
 

Detailed Description

The main workhorse for obtaining configuration entities of type T .

Template Parameters
TThe type of configuration object needed.
Type Constraints
T :class 

Member Function Documentation

◆ AddCachedConfig()

static void Apac.Configuration.Config< T >.AddCachedConfig ( string  definedName,
section 
)
inlinestatic

Adds the given section to the cache using the given name.

Parameters
definedNameThe name of the section to be cached.
sectionThe section to be added.

◆ GetConfig() [1/2]

static T Apac.Configuration.Config< T >.GetConfig ( )
inlinestatic

Gets the default configuration section named 'apac' (if defined).

Returns
The default configuration section or null.

◆ GetConfig() [2/2]

static T Apac.Configuration.Config< T >.GetConfig ( string  definedName)
inlinestatic

Gets the default configuration section named

Parameters
definedName.

Returns
The requested configuration section or null.

◆ GetSection() [1/2]

static T Apac.Configuration.Config< T >.GetSection ( System.Configuration.Configuration  config)
inlinestatic

Gets the default configuration section from the given configuration object. Note that the configuration file is re-parsed every time a section is loaded using the Configuration object.

Parameters
configThe Configuration object used to get the section.
Returns
The default section or null.

◆ GetSection() [2/2]

static T Apac.Configuration.Config< T >.GetSection ( System.Configuration.Configuration  config,
string  definedName 
)
inlinestatic

Gets the configuration section with the given name from the given configuration object. Note that the configuration file is re-parsed every time a section is loaded using the Configuration object.

Parameters
configThe Configuration object used to get the section.
definedNameThe name of the requested configuration section.
Returns
The default section or null.

◆ RemoveCachedConfig()

static void Apac.Configuration.Config< T >.RemoveCachedConfig ( string  definedName)
inlinestatic

Removes the section with the given name from the cache.

Parameters
definedNameThe name of the section to be found.

The documentation for this class was generated from the following file: