Ejemplo n.º 1
0
            private void RemoveConnection(PooledConnection connection)
            {
                if (_listener != null)
                {
                    _listener.ConnectionPoolBeforeRemovingAConnection(new ConnectionPoolBeforeRemovingAConnectionEvent(connection.ConnectionId));
                }

                var stopwatch = Stopwatch.StartNew();

                connection.Dispose();
                stopwatch.Stop();

                if (_listener != null)
                {
                    _listener.ConnectionPoolAfterRemovingAConnection(new ConnectionPoolAfterRemovingAConnectionEvent(connection.ConnectionId, stopwatch.Elapsed));
                }
            }
Ejemplo n.º 2
0
 public void ConnectionPoolBeforeRemovingAConnection(ConnectionId connectionId)
 {
     _first.ConnectionPoolBeforeRemovingAConnection(connectionId);
     _second.ConnectionPoolBeforeRemovingAConnection(connectionId);
 }
 public void ConnectionPoolBeforeRemovingAConnection(ConnectionPoolBeforeRemovingAConnectionEvent @event)
 {
     _first.ConnectionPoolBeforeRemovingAConnection(@event);
     _second.ConnectionPoolBeforeRemovingAConnection(@event);
 }