コード例 #1
0
ファイル: SdeConnection.cs プロジェクト: jugstalt/gViewGisOS
        public static void DisposePool(string connectionString)
        {
            SdeConnectionPool pool = Globals.ConnectionManager[connectionString];

            if (pool == null)
            {
                return;
            }

            pool.Dispose();
        }
コード例 #2
0
ファイル: SdeConnection.cs プロジェクト: jugstalt/gViewGisOS
        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);
                }
            }
        }