public void AddListener(Object owner, ComponentListenerDelegate d)
 {
     lock (Owners) {
         List <ComponentListenerDelegate> group = null;
         if (owner != null)
         {
             Owners.TryGetValue(owner, out group);
         }
         if (group == null)
         {
             group = new List <ComponentListenerDelegate>();
             Owners.TryAdd(owner, group);
         }
         group.Add(d);
     }
 }
 public void RemoveListener(Object owner, ComponentListenerDelegate d)
 {
     lock (Owners) {
         List <ComponentListenerDelegate> group = null;
         if (owner != null)
         {
             Owners.TryGetValue(owner, out group);
             if (group != null)
             {
                 group.Remove(d);
                 if (group.Count == 0)
                 {
                     Owners.TryRemove(owner, out group);
                 }
             }
         }
     }
 }
Exemple #3
0
 public void AddListener(Object owner, ComponentListenerDelegate d)
 {
     ComponentListeners.AddListener(owner, d);
 }
Exemple #4
0
 public void RemoveListener(Object owner, ComponentListenerDelegate d)
 {
     ManagerListeners.RemoveListener(owner, d);
 }