예제 #1
0
 /// <summary>
 /// 发布事件到队列时触发处理事件
 /// </summary>
 /// <param name="sendere"></param>
 /// <param name="e"></param>
 private void EventQueue_EventPushed(object sendere, EventProcessedEventArgs e)
 {
     (from eh in this.eventHandlers
      where
      eh.CanHandle((TEvent)e.Event)
      select eh).ToList().ForEach(async eh => await eh.HandleAsync((TEvent)e.Event));
 }
예제 #2
0
 private void OnMessagePushed(EventProcessedEventArgs e)
 {
     this.EventPushed?.Invoke(this, e);
 }