Class ConfigurationManager
Provides access to configuration settings from the app settings of an app.config or web.config... i.e. System.Configuration.ConfigurationManager.AppSettings
Inheritance
Inherited Members
Namespace: Cqrs.Configuration
Assembly: Cqrs.dll
Syntax
public class ConfigurationManager : IConfigurationManager
Methods
GetSetting(String)
Read the setting named key
.
Declaration
public virtual string GetSetting(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key (or name) of the setting to read. |
Returns
Type | Description |
---|---|
System.String |
Implements
TryGetSetting(String, out Boolean)
Read the setting named key
.
Declaration
public virtual bool TryGetSetting(string key, out bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key (or name) of the setting to read. |
System.Boolean | value | When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized. |
Returns
Type | Description |
---|---|
System.Boolean | true if the an element with the specified key exists; otherwise, false. |
Implements
TryGetSetting(String, out String)
Read the setting named key
.
Declaration
public virtual bool TryGetSetting(string key, out string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key (or name) of the setting to read. |
System.String | value | When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized. |
Returns
Type | Description |
---|---|
System.Boolean | true if the an element with the specified key exists; otherwise, false. |