Example #1
0
        public bool UnRegisterCachedAction(MainLoopEvent em, int id, System.Object ins)
        {
            int e = (int)em;

            if (this.attEvents.ContainsKey(e))
            {
                InstanceCacheDelegate d = this.attEvents[e];
                return(d.Remove(id, ins));
            }
            return(false);
        }
Example #2
0
        public void RegisterCachedAction(MainLoopEvent em, int id, System.Object ins)
        {
            int e = (int)em;

            if (this.attEvents.ContainsKey(e))
            {
                InstanceCacheDelegate d = this.attEvents[e];
                d.Add(id, ins);
            }
            else
            {
                InstanceCacheDelegate d = new InstanceCacheDelegate();
                d.Add(id, ins);
                this.attEvents.Add(e, d);
            }
        }
Example #3
0
        public void PreRegisterCachedAction(MainLoopEvent em, Action <System.Object, int> act)
        {
            int e = (int)em;

            if (this.attEvents.ContainsKey(e))
            {
                InstanceCacheDelegate d = this.attEvents[e];
                d.PreAdd(act);
            }
            else
            {
                InstanceCacheDelegate d = new InstanceCacheDelegate();
                d.PreAdd(act);
                this.attEvents.Add(e, d);
            }
        }