public void DeleteAppRelease(LoginInfo login, AppReleaseInfo appRelease)
 {
     using (UserModel m = GetUserModel (login)) {
         var arel = m.GetAppRelease (appRelease.Id);
         m.DeleteAppRelease (arel.Id);
     }
 }
Beispiel #2
0
 public void DeleteAppRelease(LoginInfo login, AppReleaseInfo appRelease)
 {
     using (UserModel m = GetUserModel(login)) {
         var arel = m.GetAppRelease(appRelease.Id);
         m.DeleteAppRelease(arel.Id);
     }
 }
Beispiel #3
0
        public void UpdateAppRelease(LoginInfo login, AppReleaseInfo appRelease)
        {
            using (UserModel m = GetUserModel(login)) {
                var arel = m.GetAppRelease(appRelease.Id);
                if (arel == null)
                {
                    throw new Exception("Release not found: " + appRelease.Id);
                }
                arel.AppVersion = appRelease.AppVersion;
                if (!string.IsNullOrEmpty(appRelease.CompatibleAppVersion))
                {
                    var compatRel = m.GetAppReleases().FirstOrDefault(r => r.AppVersion == appRelease.CompatibleAppVersion);
                    if (compatRel != null)
                    {
                        arel.CompatibleAppReleaseId = compatRel.Id;
                    }
                    else
                    {
                        throw new Exception("Invalid compatible release number. Release '" + appRelease.CompatibleAppVersion + "' not found");
                    }
                }
                else
                {
                    arel.CompatibleAppReleaseId = null;
                }

                m.UpdateAppRelease(arel, null);
                Cydin.Builder.BuildService.UpdateRepositories(true);
            }
        }
        public void UpdateAppRelease(LoginInfo login, AppReleaseInfo appRelease)
        {
            using (UserModel m = GetUserModel (login)) {
                var arel = m.GetAppRelease (appRelease.Id);
                if (arel == null)
                    throw new Exception ("Release not found: " + appRelease.Id);
                arel.AppVersion = appRelease.AppVersion;
                if (!string.IsNullOrEmpty (appRelease.CompatibleAppVersion)) {
                    var compatRel = m.GetAppReleases ().FirstOrDefault (r => r.AppVersion == appRelease.CompatibleAppVersion);
                    if (compatRel != null)
                        arel.CompatibleAppReleaseId = compatRel.Id;
                    else
                        throw new Exception ("Invalid compatible release number. Release '" + appRelease.CompatibleAppVersion + "' not found");
                } else
                    arel.CompatibleAppReleaseId = null;

                m.UpdateAppRelease (arel, null);
                Cydin.Builder.BuildService.UpdateRepositories (true);
            }
        }