コード例 #1
0
 public void RemoveNotificationDelegate(KNNotificationDelegate del)
 {
     foreach (ArrayList listOfDelegates in delegates.Values) {
         if (listOfDelegates.Contains(del)) {
             listOfDelegates.Remove(del);
         }
     }
 }
コード例 #2
0
 public void AddObserverForNotificationName(KNNotificationDelegate del, string notificationName)
 {
     if (!delegates.ContainsKey(notificationName)) {
         delegates.Add(notificationName, new ArrayList());;
     }
     if (!((ArrayList)delegates.ValueForKey(notificationName)).Contains(del)) {
         ((ArrayList)delegates.ValueForKey(notificationName)).Add(del);
     }
 }