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 ConnectionPoolAfterRemovingAConnection(ConnectionId connectionId, TimeSpan elapsed) { _first.ConnectionPoolAfterRemovingAConnection(connectionId, elapsed); _second.ConnectionPoolAfterRemovingAConnection(connectionId, elapsed); }
public void ConnectionPoolAfterRemovingAConnection(ConnectionPoolAfterRemovingAConnectionEvent @event) { _first.ConnectionPoolAfterRemovingAConnection(@event); _second.ConnectionPoolAfterRemovingAConnection(@event); }