예제 #1
0
 public void Add(EventGroup pGroup)
 {
     if (!groups.ContainsKey(pGroup.Key))
     {
         groups.Add(pGroup.Key, pGroup);
     }
 }
예제 #2
0
        static public void Reg(object pTarget, System.Type pType, Action <object> pReceiver)
        {
            if (pReceiver == null)
            {
                return;
            }
            EventGroup tgroup = null;

            if (!Eventdp.mReceiver.ContainsKey(pType))
            {
                Eventdp.mReceiver.Add(pType, new EventGroup(pType));
            }
            tgroup = Eventdp.mReceiver[pType];
            tgroup.Add(pTarget, pReceiver);


            if (!Eventdp.objParentlists.ContainsKey(pTarget))
            {
                Eventdp.objParentlists.Add(pTarget, new ObjectGroupList(pTarget));
            }
            Eventdp.objParentlists[pTarget].Add(tgroup);
        }