public void DispatchEvent(EventContext context) { EventBridge bridge = this.TryGetEventBridge(context.type); EventBridge gBridge = null; if ((this is DisplayObject) && (( DisplayObject )this).gOwner != null) { gBridge = (( DisplayObject )this).gOwner.TryGetEventBridge(context.type); } EventDispatcher savedSender = context.sender; if (bridge != null && !bridge.isEmpty) { bridge.CallCaptureInternal(context); bridge.CallInternal(context); } if (gBridge != null && !gBridge.isEmpty) { gBridge.CallCaptureInternal(context); gBridge.CallInternal(context); } context.sender = savedSender; }
internal void InternalCall(EventBridge bridge, EventType type, object data = null, BaseEventData eventData = null) { EventBridge gBridge = null; if ((this is DisplayObject) && (( DisplayObject )this).gOwner != null) { gBridge = (( DisplayObject )this).gOwner.TryGetEventBridge(type); } bool b1 = bridge != null && !bridge.isEmpty; bool b2 = gBridge != null && !gBridge.isEmpty; if (b1 || b2) { EventContext context = EventContext.Get(); context.initiator = this; context.eventData = eventData; context.data = data; if (b1) { bridge.CallCaptureInternal(context); bridge.CallInternal(context); } if (b2) { gBridge.CallCaptureInternal(context); gBridge.CallInternal(context); } context.Release(); } }
internal void InternalSimpleCall(EventBridge bridge, EventType type, object data = null, BaseEventData eventData = null) { if (bridge == null || bridge.isEmpty) { return; } EventContext context = EventContext.Get(); context.initiator = this; context.eventData = eventData; context.data = data; bridge.CallCaptureInternal(context); bridge.CallInternal(context); context.Release(); }