public ConnectionPool(IConnectionFactory <TConnection> connectionFactory) { if (connectionFactory == null) { throw new ArgumentNullException(nameof(connectionFactory)); } _availableConnections = new BlockingQueue <TConnection>(connectionFactory.CreateConnections().ToArray()); _scopedConnections = new ConcurrentDictionary <ConnectionId, TConnection>(); }