示例#1
0
        public void Post(EventId id, XEventArgs args)
        {
            if (!_events.ContainsKey(id))
            {
                return;
            }

            var list = _events[id];

            list.Call(args);
        }
示例#2
0
 public void Call(XEventArgs args)
 {
     for (var i = _items.Count - 1; i >= 0; i--)
     {
         try
         {
             _items[i].Handler.Invoke(args);
         }
         catch (Exception ex)
         {
             Debug.WriteLine("Event Call Exception:" + ex.Message);
             throw;
         }
     }
 }