public Dictionary <string, string> GatherSettings() { CachedSettings.Clear(); foreach (var settingMapper in SettingMappings) { CachedSettings.Add(settingMapper.Key, settingMapper.Value.Load()); } SettingChangeEmitters.ForEach(emitter => emitter(CachedSettings)); return(CachedSettings.ToDictionary(entry => entry.Key, entry => entry.Value)); }
public void UpdateSetting(string setting, string value) { if (!CachedSettings.ContainsKey(setting)) { CachedSettings.Add(setting, value); } else { CachedSettings[setting] = value; } }