예제 #1
0
 /// <summary>
 /// Triggers the ConnectionChanged event.
 /// </summary>
 public virtual void OnConnectionChanged(ConnectionChangedEventArgs ea)
 {
     if (ConnectionChanged != null)
         ConnectionChanged(this, ea);
 }
예제 #2
0
 internal override void _outPortMgr_ConnectionChanged(IOutputPortMgr sender, ConnectionChangedEventArgs ea)
 {
     _outPortMgr_ConnectionChanged_TimesCalled++;
 }
예제 #3
0
 internal void OutputPort_ConnectionChanged(IOutputPort sender, ConnectionChangedEventArgs ea)
 {
     if (sender == null)
         return;
     OnConnectionChanged(ea);
 }
예제 #4
0
 public void ConnectionChanged_DummyHandler(IInputPortMgr sender, ConnectionChangedEventArgs ea)
 {
     ConnectionChanged_TimesCalled++;
     RecievedEventArgs = ea;
     RecievedSender = sender;
 }
예제 #5
0
 public void ConnectionChanged_DummyHandler(IOutputNetworkPort sender, ConnectionChangedEventArgs ea)
 {
     ConnectionChanged_TimesCalled++;
     RecievedEventArgs = ea;
     RecievedSender = sender;
 }
예제 #6
0
 public void InputConnected_DummyHandler(IInputNeutralPort sender, ConnectionChangedEventArgs ea)
 {
     InputConnected_TimesCalled++;
     RecievedEventArgs = ea;
     RecievedSender = sender;
 }
예제 #7
0
 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).
 }
예제 #8
0
 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);
         }
     }
 }
예제 #9
0
파일: InputPortMgr.cs 프로젝트: BgRva/Blob1
 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);
 }
예제 #10
0
 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);
        }