コード例 #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));
                }
            }
コード例 #2
0
 public void ConnectionPoolAfterRemovingAConnection(ConnectionId connectionId, TimeSpan elapsed)
 {
     _first.ConnectionPoolAfterRemovingAConnection(connectionId, elapsed);
     _second.ConnectionPoolAfterRemovingAConnection(connectionId, elapsed);
 }
コード例 #3
0
 public void ConnectionPoolAfterRemovingAConnection(ConnectionPoolAfterRemovingAConnectionEvent @event)
 {
     _first.ConnectionPoolAfterRemovingAConnection(@event);
     _second.ConnectionPoolAfterRemovingAConnection(@event);
 }