public bool Init(ConoDBConfig config)
        {
            try
            {
                dbJobQueue = new ConoDBJobQueue();

                if (dbJobQueue.Init() == false)
                {
                    return(false);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.StackTrace);
            }
            dbConnection = new ConoDBConnection();

            if (dbConnection.Init(config.ip, config.port, config.dbName, config.uid, config.pwd) == false)
            {
                return(false);
            }

            this.handler = config.handler;

            return(true);
        }
Example #2
0
        /**
         * @brief
         * 클래스 내부 변수를 초기화 시키는 함수
         *
         * @details
         * 받은 정보들을 클래스 변수들로 세팅한다.
         */
        public bool Init(string ip, int port, string dbName, string uid, string pwd, IConoDBHandler handler)
        {
            this.ip      = ip;
            this.port    = port;
            this.dbName  = dbName;
            this.uid     = uid;
            this.pwd     = pwd;
            this.handler = handler;

            return(true);
        }