Esempio n. 1
0
        private void AddNewVersionApp(ReformApp reformApp, AppListItem app, AppProject appProject)
        {
            try
            {
                var appitems = AppStoreUIService.GetAppsFromAppList <AppProject>(appProject.Id);
                foreach (var a in appitems)
                {
                    var versions = RedisService.GetAllSubModelIdsByType <App, AppVersion>(a.Id).ToIdsWithNoPrefix <AppVersion>();

                    if (!versions.Contains(app.versionCode.ToString()))
                    {
                        reformApp.NewVersionCount = AddNewVersionForApp(reformApp.NewVersionCount, app, a);
                    }
                    else
                    {
                        reformApp.DupVersionCount++;
                        LogHelper.WriteInfo(string.Format("Already has version {1} for app name {0}", app.name, app.versionCode), ConsoleColor.DarkYellow);
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.WriteError(ex.Message + ex.StackTrace);
            }
        }
Esempio n. 2
0
        private void BuildAppProjectByNewApp(ReformApp reformApp, AppListItem app)
        {
            if (app != null)
            {
                var appProject = AppStoreUIService.GetAppProjectByPKGName(app.packageName);

                if (appProject == null)
                {
                    var isExist = AppStoreUIService.GetAppProjectByAppNo("tencent_" + app.appid);
                    if (isExist == null)
                    {
                        LogHelper.WriteInfo(string.Format("Has new app, name {0}, downloading...", app.name), ConsoleColor.Yellow);
                        reformApp.NewAppCount++;
                        AppInfo appInfo = DowloadAppInfoAndResources(app.appid.ToString());
                        appProject = AddNewApp(app, appProject, appInfo);
                    }
                    else
                    {
                        LogHelper.WriteInfo(string.Format("This app, name {0}, exist same appno, skipped", app.name), ConsoleColor.Yellow);
                    }
                }
                else
                {
                    try
                    {
                        var appitems = AppStoreUIService.GetAppsFromAppList <AppProject>(appProject.Id);
                        if (appitems == null)
                        {
                            AppProjectDelete(appProject.Id);
                        }
                        else
                        {
                            AddNewVersionApp(reformApp, app, appProject);
                        }
                    }
                    catch (Exception)
                    {
                        AppProjectDeleteWithEmpty(appProject.Id);
                    }
                }
            }
        }
Esempio n. 3
0
 public void AppVersionDelete(string appProjectId, AppListItem item)
 {
 }