Esempio n. 1
0
        ISettingValue <T> IConfigSectionAdmin.AddSetting <T>(string key, T defaultValue)
        {
            var setting = new EmptySetting <T>(key, defaultValue, defaultValue);

            _settingList.Add(setting.Key, setting);
            return(setting);
        }
Esempio n. 2
0
        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]);
        }
Esempio n. 3
0
        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]);
        }
Esempio n. 4
0
        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]);
        }