示例#1
0
        private void RemoveConnection(ITrackingDisconnect connection)
        {
            // Remove the connection and associated metadata
            _connections.Remove(connection);
            DateTime removed;

            _connectionMetadata.TryRemove(connection, out removed);
        }
示例#2
0
        public void AddConnection(ITrackingDisconnect connection)
        {
            // Remove and re-add the connection so we have the correct object reference
            _connections.Remove(connection);
            _connections.Add(connection);

            // Remove the metadata for new connections
            DateTime removed;

            _connectionMetadata.TryRemove(connection, out removed);
        }
示例#3
0
 public void MarkConnection(ITrackingDisconnect connection)
 {
     // Mark this time this connection was used
     _connectionMetadata[connection] = DateTime.UtcNow;
 }
示例#4
0
 public void RemoveConnection(ITrackingDisconnect connection)
 {
     _connections.Remove(connection);
 }
示例#5
0
 public void AddConnection(ITrackingDisconnect connection)
 {
     _connections.Remove(connection);
     _connections.Add(connection);
 }