예제 #1
0
        public void ClearPool(string connectionString)
        {
            lock (this.SyncObject)
            {
                lock (this.Pools.SyncRoot)
                {
                    if (this.Pools.ContainsKey(connectionString))
                    {
                        FbConnectionPool pool = (FbConnectionPool)this.Pools[connectionString];

                        // Clear pool
                        pool.Clear();
                    }
                }
            }
        }
예제 #2
0
        public void ClearPool(string connectionString)
        {
            lock (this.SyncObject)
            {
                if (this.pools != null)
                {
                    lock (this.pools.SyncRoot)
                    {
                        int hashCode = connectionString.GetHashCode();

                        if (this.pools.ContainsKey(hashCode))
                        {
                            FbConnectionPool pool = (FbConnectionPool)this.pools[hashCode];

                            // Clear pool
                            pool.Clear();
                        }
                    }
                }
            }
        }