Joutsen v0.5.0+12-g5dd5f7e
Public Member Functions | List of all members
Joutsen.Configuration.ApplicationConfiguration Interface Reference

An interface for application wide configurations. More...

Public Member Functions

String GetValue (String key)
 Fetches a value identified by a key as a string. More...
 
ValueType GetValue< ValueType > (String key)
 Fetches a value identified by a key as a specific type. More...
 
ValueType GetValue< ValueType > (String key, SimpleTypeConverter< string, ValueType > converter)
 Fetches a value identified by a key as a specific type. More...
 
SectionType GetSection< SectionType > (String sectionName)
 Fetches a section from the configuration. More...
 

Detailed Description

An interface for application wide configurations.

Since
0.4.0

Member Function Documentation

◆ GetSection< SectionType >()

SectionType Joutsen.Configuration.ApplicationConfiguration.GetSection< SectionType > ( String  sectionName)

Fetches a section from the configuration.

Type Constraints
SectionType :global 
SectionType :System.Configuration.ConfigurationSection 

◆ GetValue()

String Joutsen.Configuration.ApplicationConfiguration.GetValue ( String  key)

Fetches a value identified by a key as a string.

Implemented in Joutsen.Configuration.XmlApplicationConfiguration.

◆ GetValue< ValueType >() [1/2]

ValueType Joutsen.Configuration.ApplicationConfiguration.GetValue< ValueType > ( String  key)

Fetches a value identified by a key as a specific type.

Type Constraints
ValueType :IConvertible 

◆ GetValue< ValueType >() [2/2]

ValueType Joutsen.Configuration.ApplicationConfiguration.GetValue< ValueType > ( String  key,
SimpleTypeConverter< string, ValueType >  converter 
)

Fetches a value identified by a key as a specific type.

Parameters
keythe configuration key
converterthe converter used to convert the read string into a specific type
Returns
the value as the converted type