internal void ConnectPipeModel(IDataPipe pipe, IOutputDataPort srcPort, IInputDataPort destPort) { IDataPlumber plumber = null; using (PlumberFactory pf = new PlumberFactory()) { plumber = pf.CreateDataPlumber(); } plumber.DataPipe = pipe; plumber.SetInitialPort(srcPort); plumber.SetFinalPort(destPort); bool result = plumber.Connect(); // TODO log connection results. if (!result) { throw new InvalidOperationException("The pipe could not be connected"); } }
public void Reset() { _outputPort = null; _inputPort = null; _pipe = null; }
public void InputConnecting_DummyHandler(IInputDataPort sender, ConnectionChangingEventArgs ea) { InputConnecting_TimesCalled++; RecievedEventArgs = ea; RecievedSender = sender; }
public void SetInitialPort(IInputDataPort port) { DestinationDataPort = port; InitialPort = DestinationDataPort; if (IsInitialPortSet) OnInitialPortSet(new PortSetEventArgs(DestinationDataPort, true)); }
public void SetFinalPort(IInputDataPort port) { if (!IsInitialPortSet) { ThrowExceptionIfInitPortNotSet(); } else { DestinationDataPort = port; FinalPort = DestinationDataPort; if (IsFinalPortSet) OnFinalPortSet(new PortSetEventArgs(DestinationDataPort, false)); } }
public Edge(IOutputDataPort output, IInputDataPort input) { Output = output.GetPort(); Input = input.GetPort(); }