예제 #1
0
        public static void DisposePool(string connectionString)
        {
            SdeConnectionPool pool = Globals.ConnectionManager[connectionString];

            if (pool == null)
            {
                return;
            }

            pool.Dispose();
        }
예제 #2
0
        public bool Open()
        {
            _errMsg = "";
            _pool   = Globals.ConnectionManager[_connectionString];
            if (_pool == null)
            {
                return(true);
            }
            _sdeConnection = _pool.Alloc();

            return(_sdeConnection != null);
        }
예제 #3
0
        public SdeConnectionPool this[string connectionString]
        {
            get
            {
                lock (_lockThis)
                {
                    foreach (SdeConnectionPool pool in _pools)
                    {
                        if (pool.ConnectionString == connectionString)
                        {
                            return(pool);
                        }
                    }
                    if (_maxPools > 0 && _pools.Count >= _maxPools)
                    {
                        return(null);
                    }

                    SdeConnectionPool newpool = new SdeConnectionPool(_maxConnectionsPerPool, connectionString);
                    _pools.Add(newpool);
                    return(newpool);
                }
            }
        }