Exemplo n.º 1
0
        private ThreadedSql.ThreadedSqlParameters GetNullParamaters()
        {
            ThreadedSql.ThreadedSqlParameters param = new ThreadedSql.ThreadedSqlParameters();
            param.CommandTimeout = 0;
            param.Identifier     = "";
            param.Sql            = "";
            param.Result         = null;

            return(param);
        }
Exemplo n.º 2
0
        private IList <ThreadedSql> ConstructPool()
        {
            IList <ThreadedSql> objectPool = new List <ThreadedSql>();

            for (int counter = 0; counter < _startingCount; counter++)
            {
                //construct default parameters
                ThreadedSql.ThreadedSqlParameters param = GetNullParamaters();

                //create default client
                ThreadedSql client = new ThreadedSql(param);

                //connect client to Db

                objectPool.Add(client);
            }

            return(objectPool);
        }