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)); } }
public void ConnectionPoolBeforeRemovingAConnection(ConnectionId connectionId) { _first.ConnectionPoolBeforeRemovingAConnection(connectionId); _second.ConnectionPoolBeforeRemovingAConnection(connectionId); }
public void ConnectionPoolBeforeRemovingAConnection(ConnectionPoolBeforeRemovingAConnectionEvent @event) { _first.ConnectionPoolBeforeRemovingAConnection(@event); _second.ConnectionPoolBeforeRemovingAConnection(@event); }