internal Connection(NamedConnection onlyConnection) { namedConnections = new HashSet <NamedConnection> { onlyConnection }; }
internal void ConnectTo(NamedConnection other) { // Add to this connection namedConnections.Add(other); // Set all connections 'other' is connected to to point to this connection var previousConnections = other.Connection.NamedConnections; foreach (var c in previousConnections) { c.Connection = this; } // Add all connections 'other' points to namedConnections.UnionWith(other.Connection.NamedConnections); // Set the 'other' connection to point to this other.Connection = this; }
public void ConnectTo(NamedConnection other) => Connection.ConnectTo(other);
internal void Disconnect(NamedConnection namedConnection) { namedConnections.Remove(namedConnection); }