/// <summary> /// Triggers the ConnectionChanging event. /// </summary> public virtual void OnConnectionChanging(ConnectionChangingEventArgs ea) { if (ConnectionChanging != null) ConnectionChanging(this, ea); }
internal override void _outPortMgr_ConnectionChanging(IOutputPortMgr sender, ConnectionChangingEventArgs ea) { _outPortMgr_ConnectionChanging_TimesCalled++; }
internal void OutputPort_ConnectionChanging(IOutputPort sender, ConnectionChangingEventArgs ea) { if (sender == null) return; OnConnectionChanging(ea); }
public void ConnectionChanging_DummyHandler(IInputPortMgr sender, ConnectionChangingEventArgs ea) { ConnectionChanging_TimesCalled++; RecievedEventArgs = ea; RecievedSender = sender; }
public void ConnectionChanging_DummyHandler(IOutputNetworkPort sender, ConnectionChangingEventArgs ea) { ConnectionChanging_TimesCalled++; RecievedEventArgs = ea; RecievedSender = sender; }
public void InputConnecting_DummyHandler(IInputNeutralPort sender, ConnectionChangingEventArgs ea) { InputConnecting_TimesCalled++; RecievedEventArgs = ea; RecievedSender = sender; }
internal void _outPortMgr_ConnectionChanging(IOutputPortMgr sender, ConnectionChangingEventArgs 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_ConnectionChanging(IInputPortMgr sender, ConnectionChangingEventArgs ea) { if (sender != null) { if (ea.Action != ConnectionAction.None) { // in all cases, the element state will go to incomplete. SetStatus(ElementStatus.Incomplete, StatusChangeDriver.NormalTransition, null); } } }
internal void InputPort_ConnectionChanging(IInputPort sender, ConnectionChangingEventArgs ea) { if (sender == null) return; // this input mgr becomes the new sender for the next level up OnConnectionChanging(ea); }
internal virtual void _outPortMgr_ConnectionChanging(IOutputPortMgr sender, ConnectionChangingEventArgs ea) { throw new NotImplementedException("The method or operation is not implemented."); }
public void OutputPortMgrConnectionChangingEventHandlerUpdatesElementStateToIncompleteWhenActionIsReplace() { ElementStatus expectedStatus = ElementStatus.Incomplete; ConnectionAction action = ConnectionAction.Replace; ConnectionChangingEventArgs args = new ConnectionChangingEventArgs(action); var mockOutPortMgr = new Mock<IOutputPortMgr>(); _el._outPortMgr_ConnectionChanging(mockOutPortMgr, args); ElementStatus actualStatus = _el.Status; Assert.Equal(expectedStatus, actualStatus); }