Пример #1
0
        public void PostImmediately(Notification notification)
        {
            String name = notification.name;
            NotificationDelegateList list = FindList(name);

            if (list != null)
            {
                list.NotifyDelegates(notification);
            }
            m_notificatoinsPool.RecycleObject(notification);
        }
Пример #2
0
        public void PostImmediately(Object sender, String name, Object data = null, Object data2 = null, Object data3 = null, Object data4 = null)
        {
            NotificationDelegateList list = FindList(name);

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

                list.NotifyDelegates(notification);

                m_notificatoinsPool.RecycleObject(notification);
            }
        }