示例#1
0
 /// <summary>
 /// Notifies the data change.
 /// </summary>
 /// <param name="eventResult">The event result.</param>
 public void NotifyDataChange(EventResultData eventResult)
 {
     EventResultData data = eventResult;
     if (data != null)
     {
         ClientEventDispatcher.Instance.DispachEvent(data.Topic, data.Args);
     }
 }
示例#2
0
        /// <summary>
        /// 检测所有事件
        /// </summary>
        /// <returns>事件结果数组</returns>
        private EventResultData[] DetectEvent()
        {
            List <EventResultData> list = new List <EventResultData>();

            foreach (string topic in listeners.Keys)
            {
                EventArgs[] args = listeners[topic].DequeueAllEventArgs();
                if (args.Length != 0)
                {
                    foreach (EventArgs arg in args)
                    {
                        EventResultData result = new EventResultData(topic, arg);
                        list.Add(result);
                    }
                }
            }
            return(list.ToArray());
        }
示例#3
0
 /// <summary>
 /// 检测所有事件
 /// </summary>
 /// <returns>事件结果数组</returns>
 private EventResultData[] DetectEvent()
 {
     List<EventResultData> list = new List<EventResultData>();
     foreach (string topic in listeners.Keys)
     {
         EventArgs[] args = listeners[topic].DequeueAllEventArgs();
         if (args.Length != 0)
         {
             foreach (EventArgs arg in args)
             {
                 EventResultData result = new EventResultData(topic, arg);
                 list.Add(result);
             }
         }
     }
     return list.ToArray();
 }