internal System.Data.ProviderBase.DbConnectionInternal GetConnection(DbConnection owningConnection)
        {
            System.Data.ProviderBase.DbConnectionInternal connection;
            int num2 = 10;
            int millisecondsTimeout = 1;

            do
            {
                System.Data.ProviderBase.DbConnectionPoolGroup connectionPoolGroup = this.GetConnectionPoolGroup(owningConnection);
                System.Data.ProviderBase.DbConnectionPool      connectionPool      = this.GetConnectionPool(owningConnection, connectionPoolGroup);
                if (connectionPool == null)
                {
                    connectionPoolGroup = this.GetConnectionPoolGroup(owningConnection);
                    connection          = this.CreateNonPooledConnection(owningConnection, connectionPoolGroup);
                    this.PerformanceCounters.NumberOfNonPooledConnections.Increment();
                }
                else
                {
                    connection = connectionPool.GetConnection(owningConnection);
                    if (connection == null)
                    {
                        if (connectionPool.IsRunning)
                        {
                            Bid.Trace("<prov.DbConnectionFactory.GetConnection|RES|CPOOL> %d#, GetConnection failed because a pool timeout occurred.\n", this.ObjectID);
                            throw System.Data.Common.ADP.PooledOpenTimeout();
                        }
                        Thread.Sleep(millisecondsTimeout);
                        millisecondsTimeout *= 2;
                    }
                }
            }while ((connection == null) && (num2-- > 0));
            if (connection == null)
            {
                Bid.Trace("<prov.DbConnectionFactory.GetConnection|RES|CPOOL> %d#, GetConnection failed because a pool timeout occurred and all retries were exhausted.\n", this.ObjectID);
                throw System.Data.Common.ADP.PooledOpenTimeout();
            }
            return(connection);
        }