/// <summary> /// Triggers the ConnectionChanged event. /// </summary> public virtual void OnConnectionChanged(ConnectionChangedEventArgs ea) { if (ConnectionChanged != null) ConnectionChanged(this, ea); }
internal override void _outPortMgr_ConnectionChanged(IOutputPortMgr sender, ConnectionChangedEventArgs ea) { _outPortMgr_ConnectionChanged_TimesCalled++; }
internal void OutputPort_ConnectionChanged(IOutputPort sender, ConnectionChangedEventArgs ea) { if (sender == null) return; OnConnectionChanged(ea); }
public void ConnectionChanged_DummyHandler(IInputPortMgr sender, ConnectionChangedEventArgs ea) { ConnectionChanged_TimesCalled++; RecievedEventArgs = ea; RecievedSender = sender; }
public void ConnectionChanged_DummyHandler(IOutputNetworkPort sender, ConnectionChangedEventArgs ea) { ConnectionChanged_TimesCalled++; RecievedEventArgs = ea; RecievedSender = sender; }
public void InputConnected_DummyHandler(IInputNeutralPort sender, ConnectionChangedEventArgs ea) { InputConnected_TimesCalled++; RecievedEventArgs = ea; RecievedSender = sender; }
internal void _outPortMgr_ConnectionChanged(IOutputPortMgr sender, ConnectionChangedEventArgs ea) { // Do nothing here since there is no need to change the status of the element; // (used to throw a NotImplementedException here but it interfered with testing compound elements). }
internal void _inPortMgr_ConnectionChanged(IInputPortMgr sender, ConnectionChangedEventArgs ea) { if (sender != null) { if (ea.Action != ConnectionAction.None) { // in all cases, the element state will go to incomplete. All cases should be set to // incomplete by the _inPortMgr_ConnectionChanging handler, we do it here also for // consistency SetStatus(ElementStatus.Incomplete, StatusChangeDriver.NormalTransition, null); } } }
internal void InputPort_ConnectionChanged(IInputPort sender, ConnectionChangedEventArgs ea) { if (sender == null) return; // this input mgr becomes the new sender for the next level up OnConnectionChanged(ea); }
internal virtual void _outPortMgr_ConnectionChanged(IOutputPortMgr sender, ConnectionChangedEventArgs ea) { throw new NotImplementedException("The method or operation is not implemented."); }
public void OutputPortMgrConnectionChangedEventHandlerUpdatesElementStateToIncompleteWhenActionIsReplace() { ElementStatus expectedStatus = ElementStatus.Incomplete; ConnectionAction action = ConnectionAction.Replace; ConnectionChangedEventArgs args = new ConnectionChangedEventArgs(action); var mockOutPortMgr = new Mock<IOutputPortMgr>(); _el._outPortMgr_ConnectionChanged(mockOutPortMgr, args); ElementStatus actualStatus = _el.Status; Assert.Equal(expectedStatus, actualStatus); }