Exemplo n.º 1
0
 internal Connection(NamedConnection onlyConnection)
 {
     namedConnections = new HashSet <NamedConnection>
     {
         onlyConnection
     };
 }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public void ConnectTo(NamedConnection other) => Connection.ConnectTo(other);
Exemplo n.º 4
0
 internal void Disconnect(NamedConnection namedConnection)
 {
     namedConnections.Remove(namedConnection);
 }