Esempio n. 1
0
 internal Connection(NamedConnection onlyConnection)
 {
     namedConnections = new HashSet <NamedConnection>
     {
         onlyConnection
     };
 }
Esempio n. 2
0
 internal Connection(NamedConnection onlyConnection, string connectionId)
 {
     namedConnections = new HashSet <NamedConnection>
     {
         onlyConnection
     };
     ConnectionId = connectionId;
 }
Esempio n. 3
0
        internal void ConnectTo(NamedConnection other)
        {
            // Add all connections 'other' points to
            namedConnections.UnionWith(other.Connection.NamedConnections);

            // 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;
            }
        }
Esempio n. 4
0
        internal void ConnectTo(NamedConnection other)
        {
            // Unset the connection ID if the other connection has a different ID
            if (other.Connection.ConnectionId != null && other.Connection.ConnectionId != ConnectionId)
            {
                ConnectionId = null;
            }

            // Add all connections 'other' points to
            namedConnections.UnionWith(other.Connection.NamedConnections);

            // 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;
            }
        }
Esempio n. 5
0
 public void ConnectTo(NamedConnection other) => Connection.ConnectTo(other);
Esempio n. 6
0
 internal void Disconnect(NamedConnection namedConnection)
 {
     namedConnections.Remove(namedConnection);
 }