예제 #1
0
        /// <summary>
        /// Publishes this event to all consumers subscribed to the exact EventID
        /// </summary>
        /// <param name="e"></param>
        public void PublishEvent(VMSEventArgs e)
        {
            if (eventRegistry.ContainsKey(e.eventID))
            {
                foreach (var consumer in eventRegistry[e.eventID])
                {
                    consumer.ConsumeEvent(e);
                }
            }
            var generic = e.GetGenericID();

            if (e.GetGenericID() != e.eventID && eventRegistry.ContainsKey(e.GetGenericID()))
            {
                foreach (var consumer in eventRegistry[e.GetGenericID()])
                {
                    consumer.ConsumeEvent(e);
                }
            }
        }
예제 #2
0
 void HandleVMSEvent(object sender, VMSEventArgs e)
 {
     PublishEvent(e);
 }