Example #1
0
        public IQueryAdapter GetQueryReactor()
        {
            IDatabaseClient databaseClient = new DatabaseClient(_connectionStr);

            databaseClient.Connect();

            return databaseClient.GetQueryReactor();
        }
Example #2
0
        private DatabaseClient AddConnection(bool needReturn = false)
        {
            lock (_databaseClients)
            {
                if (_databaseClients.Count + 1 >= _databaseClients.Capacity)
                    return null;

                if (needReturn)
                {
                    DatabaseClient client = new DatabaseClient(_serverDetails.ToString());

                    _databaseClients.Add(client);

                    return client;
                }

                _databaseClients.Add(new DatabaseClient(_serverDetails.ToString()));

                return null;
            }
        }