/// <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(e.Event) select eh).ToList().ForEach(async eh => await eh.HandleAsync(e.Event)); }
private void OnMessagePushed(EventProcessedEventArgs e) { this.EventPushed?.Invoke(this, e); }