public CAppAdImageList(int pageNo, int adIndex, CSystemLog systemLog)
 {
     PageNo     = pageNo;
     AdIndex    = adIndex;
     _SystemLog = systemLog;
     _ImageList = new List <string>();
 }
Esempio n. 2
0
 public CNetProxy(CSystemLog systemLog, CSystemConfig systemConfig)
 {
     _SystemLog    = systemLog;
     _SystemConfig = systemConfig;
     _DbConnection = new CDbConnection(_SystemConfig.getConfigItem("DB_MYSQL_CONNECT_STR").ToString(), _SystemLog);
     Id            = Guid.NewGuid().ToString().ToUpper();
 }
Esempio n. 3
0
        static int Main(string[] args)
        {
            E_ERROR_CODE errorCode = E_ERROR_CODE.ERROR;

            _SystemLog    = new CSystemLog(true, LOG_LEVEL.DEBUG, string.Format("{0}/{1}", CPublic.getAppStartPath(), "system_log"));
            _SystemConfig = new CSystemConfig(CPublic.SYSTEM_CONFIG_FILE, _SystemLog);
            errorCode     = _SystemConfig.initConfig();
            if (errorCode != E_ERROR_CODE.OK)
            {
                _SystemLog.writeLog2Console(LOG_LEVEL.CRIT, string.Format("Init system config <{0}> failed, error code <{1}>.", CPublic.SYSTEM_CONFIG_FILE, errorCode));
                return((int)errorCode);
            }

            _SystemConfig.printSystemConfig();

            _AppsflyerConfigFilePath = string.Format("{0}", _SystemConfig.getConfigItem(CONFIG_ITEM_APPSFLYER_CONFIG_FILE)).Trim();
            if (!File.Exists(_AppsflyerConfigFilePath))
            {
                _SystemLog.writeLog2Console(LOG_LEVEL.CRIT, string.Format("Appsflyer config file <{0}> not exits.", _AppsflyerConfigFilePath));
                return((int)E_ERROR_CODE.ERROR_FILE_NOT_EXIST);
            }

            CAdSeeDataSpider appsFlyerDataSpider = new CAdSeeDataSpider(_AppsflyerConfigFilePath, _SystemLog);

            errorCode = appsFlyerDataSpider.initAppsFlyerSpiderConfig();
            if (errorCode != E_ERROR_CODE.OK)
            {
                appsFlyerDataSpider.cleanUp();
                _SystemLog.writeLog2Console(LOG_LEVEL.CRIT, string.Format("Init appsflyer spider config failed, error code <{0}>.", errorCode));
                return((int)errorCode);
            }

            errorCode = appsFlyerDataSpider.initWebDriver();
            if (errorCode != E_ERROR_CODE.OK)
            {
                appsFlyerDataSpider.cleanUp();
                _SystemLog.writeLog2Console(LOG_LEVEL.CRIT, string.Format("Init webdriver failed, error code <{0}>.", errorCode));
                return((int)errorCode);
            }
            errorCode = appsFlyerDataSpider.openHomePage();
            if ((errorCode != E_ERROR_CODE.OK) || (!appsFlyerDataSpider.IsLoginSuccessed))
            {
                _SystemLog.writeLog2Console(LOG_LEVEL.ERR, string.Format("Login appsflyer system failed, after <{0}> login again.", 60));
                return((int)errorCode);
            }

            errorCode = appsFlyerDataSpider.downloadAndroidAppAdData();
            return((int)errorCode);
        }
 public CAdSeeDataSpiderConfig(string configFile, CSystemLog systemLog)
 {
     _ConfigFile = configFile;
     _SystemLog  = systemLog;
 }
Esempio n. 5
0
 public CSystemConfig(string configFile, CSystemLog systemLog)
 {
     _ConfigFile      = configFile;
     _SystemLog       = systemLog;
     _ConfigItemTable = new Dictionary <string, object> ();
 }
Esempio n. 6
0
 public CDbConnection(string connectString, CSystemLog systemLog)
 {
     _DbConnectString = connectString;
     _SystemLog       = systemLog;
 }