Beispiel #1
0
        private void Initialize(string db)
        {
            lock (lockobj)
            {
                var url  = (db ?? string.Empty).Split('@');
                var Host = url.ElementAtOrDefault(1) ?? string.Empty;
                Db = url.ElementAtOrDefault(0);

                if (pooledClientManager.ContainsKey(Host))
                {
                    CurrentPool = pooledClientManager[Host];
                }
                else
                {
                    CurrentPool = new PooledClientManager <IFile>(10, Host, "File");
                    pooledClientManager.Add(Host, CurrentPool);
                }

                if (pooledClientManagerData.ContainsKey(Host))
                {
                    CurrentPoolData = pooledClientManagerData[Host];
                }
                else
                {
                    CurrentPoolData = new PooledClientManager <IData>(3, Host, "Data");
                    pooledClientManagerData.Add(Host, CurrentPoolData);
                }
            }
        }
Beispiel #2
0
        private void Initialize(string db)
        {
            lock (lockobj)
            {
                var url  = (db ?? string.Empty).Split('@');
                var Host = url.ElementAtOrDefault(1) ?? string.Empty;
                Db = url.ElementAtOrDefault(0);

                if (pooledClientManager.ContainsKey(Host))
                {
                    CurrentPool = pooledClientManager[Host];
                }
                else
                {
                    CurrentPool = new PooledClientManager <IConfiguration>(10, Host, "Configuration");
                    pooledClientManager.Add(Host, CurrentPool);
                }
            }
        }