public void ResetPorts() { _portHandler = new PortHandler(this); PortHandler.AttemptInputAction(input => input.InputPort = new InputPort()); PortHandler.AttemptOutputAction(output => output.OutputPort = new OutputPort()); PortHandler.AttemptMultipleOutputAction(output => output.ResetOutputPorts()); }
public List <Port> GetAllPorts() { List <Port> ports = new List <Port>(); PortHandler.AttemptInputAction(input => ports.Add(input.InputPort)); PortHandler.AttemptOutputAction(output => ports.Add(output.OutputPort)); PortHandler.AttemptMultipleOutputAction(output => ports.AddRange(output.GetOutputs().ToArray())); return(ports); }
private void PortConnectionTraversal() { PortHandler.AttemptOutputAction(output => output.OutputPort.OnExit()); PortHandler.AttemptMultipleOutputAction(output => output.GetExitPort().OnExit()); }