Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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);
              }
        }