public void UpdateGeneric(Dictionary<string, int> inbound, Dictionary<string, bool> outbound, GetGeneric getFunc, OnChangeGeneric changeFunc) {
            Dictionary<string, bool> results = getFunc(inbound);
            foreach (var pair in results) {
                bool old_val = false;
                bool val = pair.Value;

                if (outbound.ContainsKey(pair.Key)) {
                    old_val = outbound[pair.Key];
                }

                if (val != old_val) {
                    outbound[pair.Key] = val;
                    changeFunc(pair.Key, val);
                }
            }
        }
Beispiel #2
0
        public void UpdateGeneric(Dictionary <string, int> inbound, Dictionary <string, bool> outbound, GetGeneric getFunc, OnChangeGeneric changeFunc)
        {
            Dictionary <string, bool> results = getFunc(inbound);

            foreach (var pair in results)
            {
                bool old_val = false;
                bool val     = pair.Value;

                if (outbound.ContainsKey(pair.Key))
                {
                    old_val = outbound[pair.Key];
                }

                if (val != old_val)
                {
                    outbound[pair.Key] = val;
                    changeFunc(pair.Key, val);
                }
            }
        }