1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
/// <summary>
/// get a configuration as a int, store into the cache
/// </summary>
/// <param name="key">the name of the config</param>
/// <param name="defaultValue">the default value if any problem occurs</param>
/// <returns></returns>
public int GetConfiguration(string key, int defaultValue)
{
return cacheConfig(_iConfigurations, key, defaultValue, int.Parse);
}
/// <summary>
/// get a configuration as a bool, store into the cache
/// </summary>
/// <param name="key">the name of the config</param>
/// <param name="defaultValue">the default value if any problem occurs</param>
/// <returns></returns>
public bool GetConfiguration(string key, bool defaultValue)
{
return cacheConfig(_bConfigurations, key, defaultValue, bool.Parse);
} |