public void PostImmediately(Notification notification) { string name = notification.Name; NotificationDelegateList list = FindList(name); if (list != null) { list.NotifyDelegates(notification); } notification.Recycle(); }
public bool UnregisterAll(Object target) { bool removed = false; foreach (KeyValuePair <string, NotificationDelegateList> e in m_registerMap) { NotificationDelegateList list = e.Value; removed |= list.RemoveAll(target); } return(removed); }
public bool Unregister(string name, NotificationDelegate del) { NotificationDelegateList list = FindList(name); if (list != null) { return(list.Remove(del)); } return(false); }
public void Post(Object sender, string name, params object[] data) { NotificationDelegateList list = FindList(name); if (list != null && list.Count > 0) { Notification notification = m_notificatoinsPool.NextObject(); notification.Init(sender, name, data); SchedulePost(notification); } }
public void PostImmediately(Object sender, string name, params object[] data) { NotificationDelegateList list = FindList(name); if (list != null && list.Count > 0) { Notification notification = m_notificatoinsPool.NextObject(); notification.Init(sender, name, data); list.NotifyDelegates(notification); notification.Recycle(); } }
public void Register(string name, NotificationDelegate del) { if (name == null) { throw new ArgumentNullException("name"); } if (del == null) { throw new NullReferenceException("del"); } NotificationDelegateList list = FindList(name); if (list == null) { list = new NotificationDelegateList(); m_registerMap [name] = list; } list.Add(del); }