示例#1
0
        static public EventParams Create(string key, object val)
        {
            var param = new EventParams();

            param._map.Add(key, val);
            return(param);
        }
示例#2
0
 void Broadcast(string eventId, EventParams eventParams)
 {
     if (_subscribers.ContainsKey(EVENT_BROADCAST))
     {
         foreach (var subscriber in _subscribers[EVENT_BROADCAST])
         {
             subscriber.OnNotified(eventId, eventParams);
         }
     }
 }
示例#3
0
 void Notify(string eventId, EventParams eventParams)
 {
     if (_subscribers.ContainsKey(eventId))
     {
         foreach (var subscriber in _subscribers[eventId])
         {
             subscriber.OnNotified(eventId, eventParams);
         }
     }
 }
示例#4
0
 protected void NotifyAboutEvent(string eventId, EventParams eventParams)
 {
     Notify(eventId, eventParams);
     Broadcast(eventId, eventParams);
 }