private void AttachForwardedPort(ForwardedPort port) { if (port.Session != null && port.Session != Session) throw new InvalidOperationException("Forwarded port is already added to a different client."); port.Session = Session; }