/// <summary> /// 隧道触发 /// </summary> public void TriggerTunneling(YuriRoutedEvent evt) { evt.RaiseOnRouterAcceptEvent(this, null); evt.RaiseProcessedEvent(this, null); if (this.IsSwallow) { evt.RaiseRouterSwallowedEvent(this, null); } else { this.Children?.ForEach(cr => cr.TriggerTunneling(evt)); } evt.RaiseOnRouterRoutedEvent(this, null); }
/// <summary> /// 冒泡触发 /// </summary> public void TriggerBubbling(YuriRoutedEvent evt) { evt.RaiseOnRouterAcceptEvent(this, null); evt.RaiseProcessedEvent(this, null); if (this.IsSwallow) { evt.RaiseRouterSwallowedEvent(this, null); } else { this.Parent?.TriggerBubbling(evt); } evt.RaiseOnRouterRoutedEvent(this, null); }
/// <summary> /// 直接触发 /// </summary> public void TriggerDirect(YuriRoutedEvent evt) { evt.RaiseOnRouterAcceptEvent(this, null); evt.RaiseProcessedEvent(this, null); evt.RaiseOnRouterRoutedEvent(this, null); }