private static void SetValue(string modName, string key, Value value) { if (!configs.ContainsKey(modName)) { configs.Add(modName, new Dictionary <string, Value>()); } configs[modName][key] = value; EventHandler <ConfigurationEventArgs> handler; if (eventDelegates.ContainsKey(modName) && null != (handler = (EventHandler <ConfigurationEventArgs>)eventDelegates[modName])) { var eventArgs = new ConfigurationEventArgs(key, value.type, value.value); handler(null, eventArgs); } }
private static void SetValue(string modName, string key, Value value) { if (!configs.ContainsKey(modName)) { configs.Add(modName, new Dictionary<string, Value>()); } configs[modName][key] = value; EventHandler<ConfigurationEventArgs> handler; if (eventDelegates.ContainsKey(modName) && null != (handler = (EventHandler<ConfigurationEventArgs>)eventDelegates[modName])) { var eventArgs = new ConfigurationEventArgs(key, value.type, value.value); handler(null, eventArgs); } }