ISettingValue <T> IConfigSectionAdmin.AddSetting <T>(string key, T defaultValue) { var setting = new EmptySetting <T>(key, defaultValue, defaultValue); _settingList.Add(setting.Key, setting); return(setting); }
public ISetting GetSettingUntyped(string key) { if (!_settingList.ContainsKey(key)) { var setting = new EmptySetting <object>(key, default(object), default(object)); _settingList.Add(key, setting); } return(_settingList[key]); }
public ISettingValue <T> GetSetting <T>(string key, T defaultValue) { if (!_settingList.ContainsKey(key)) { var setting = new EmptySetting <T>(key, defaultValue, defaultValue); _settingList.Add(key, setting); } return((EmptySetting <T>)_settingList[key]); }
public ISettingValue <T> GetSetting <T>(string settingId) { if (!_settingList.ContainsKey(settingId)) { var setting = new EmptySetting <T>(settingId, default(T), default(T)); _settingList.Add(settingId, setting); } return((EmptySetting <T>)_settingList[settingId]); }