コード例 #1
0
            private void StartCreating(CancellationToken cancellationToken)
            {
                var addingConnectionEvent = new ConnectionPoolAddingConnectionEvent(_pool._serverId, EventContext.OperationId);

                _pool._addingConnectionEventHandler?.Invoke(addingConnectionEvent);

                cancellationToken.ThrowIfCancellationRequested();

                _stopwatch  = Stopwatch.StartNew();
                _connection = _pool.CreateNewConnection();
            }
コード例 #2
0
 private void Handle(ConnectionPoolAddingConnectionEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionPoolIdBase + 4, "{0}-pool: adding connection.", TraceSourceEventHelper.Label(@event.ServerId));
 }