AP&C API Reference
Static Public Member Functions | List of all members
Apac.Configuration.ConfigSection< T > Class Template Reference
Inheritance diagram for Apac.Configuration.ConfigSection< T >:
Apac.Configuration.ConfigElement

Static Public Member Functions

static void AddCachedSection (string definedName, T section)
 Adds the given section to the cache using the given name. More...
 
static void RemoveCachedSection (string definedName)
 Removes the section with the given name from the cache. More...
 
static T GetSection (string definedName)
 Gets the default configuration section named 'apac' (if defined). More...
 
static T GetSection (System.Configuration.Configuration config, string definedName)
 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...
 

Additional Inherited Members

- Public Member Functions inherited from Apac.Configuration.ConfigElement
 ConfigElement ()
 Initializes a new instance of the ConfigElement class. More...
 
 ConfigElement (string name, string description, bool enabled)
 Initializes a new instance of the ConfigElement class. More...
 
override int GetHashCode ()
 Returns a hash code for this instance. More...
 
override bool Equals (object compareTo)
 Determines whether the specified System.Object is equal to this instance. More...
 
System.Xml.Schema.XmlSchema GetSchema ()
 This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the T:System.Xml.Serialization.XmlSchemaProviderAttribute to the class. More...
 
void ReadXml (System.Xml.XmlReader reader)
 Generates an object from its XML representation. More...
 
void WriteXml (System.Xml.XmlWriter writer)
 Converts an object into its XML representation. More...
 
- Protected Member Functions inherited from Apac.Configuration.ConfigElement
virtual void OnReadXml (System.Xml.XmlReader reader)
 Called when deserializing via XML. More...
 
virtual void OnWriteXml (System.Xml.XmlWriter writer)
 Called when serializing via XML. More...
 
- Properties inherited from Apac.Configuration.ConfigElement
virtual bool IsValid [get]
 Gives a way for subclasses to determine validity. More...
 
string Name [get, set]
 Gets or sets the name property setting. More...
 
string Description [get, set]
 Gets or sets the description property setting. More...
 
bool Enabled [get, set]
 Gets or sets a value indicating whether this ConfigElement is enabled. More...
 
log4net.ILog Log [get]
 Provides a log4net.ILog instance for use by the whole class hierarchy. More...
 

Member Function Documentation

◆ AddCachedSection()

static void Apac.Configuration.ConfigSection< T >.AddCachedSection ( 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.

◆ GetSection() [1/2]

static T Apac.Configuration.ConfigSection< T >.GetSection ( string  definedName)
inlinestatic

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

Returns
The default configuration section or null.

◆ GetSection() [2/2]

static T Apac.Configuration.ConfigSection< T >.GetSection ( System.Configuration.Configuration  config,
string  definedName 
)
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.

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.

◆ RemoveCachedSection()

static void Apac.Configuration.ConfigSection< T >.RemoveCachedSection ( 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: