public Action DisconnectInPort(string portName, Edge edge) { InPort port = Input.GetPort(portName); port.RemoveConnection(edge); return(() => { if (port.ProcessDisconnection != null) { port.ProcessDisconnection.Invoke(edge.Source); } }); }