public void PostImmediately(CNotification notification)
        {
            string name = notification.Name;
            CNotificationDelegateList list = FindList(name);

            if (list != null)
            {
                list.NotifyDelegates(notification);
            }
            notification.Recycle();
        }
        public bool UnregisterAll(Object target)
        {
            bool removed = false;

            foreach (KeyValuePair <string, CNotificationDelegateList> e in m_registerMap)
            {
                CNotificationDelegateList list = e.Value;
                removed |= list.RemoveAll(target);
            }
            return(removed);
        }
        public bool Unregister(string name, CNotificationDelegate del)
        {
            CNotificationDelegateList list = FindList(name);

            if (list != null)
            {
                return(list.Remove(del));
            }

            return(false);
        }
        public void Post(Object sender, string name, params object[] data)
        {
            CNotificationDelegateList list = FindList(name);

            if (list != null && list.Count > 0)
            {
                CNotification notification = m_notificatoinsPool.NextObject();
                notification.Init(sender, name, data);

                SchedulePost(notification);
            }
        }
        public void PostImmediately(Object sender, string name, params object[] data)
        {
            CNotificationDelegateList list = FindList(name);

            if (list != null && list.Count > 0)
            {
                CNotification notification = m_notificatoinsPool.NextObject();
                notification.Init(sender, name, data);

                list.NotifyDelegates(notification);
                notification.Recycle();
            }
        }
        public void Register(string name, CNotificationDelegate del)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            if (del == null)
            {
                throw new NullReferenceException("del");
            }

            CNotificationDelegateList list = FindList(name);

            if (list == null)
            {
                list = new CNotificationDelegateList();
                m_registerMap [name] = list;
            }

            list.Add(del);
        }