Beispiel #1
0
 public SolutionRelease GetSolutionRelease(string name, string version, string leagueCDNBaseURL)
 {
     using (ChildProgressBar child = progressBar.Spawn(1, String.Format("Downloading manifest for solution {0} (version {1})", name, version), new ProgressBarOptions {
         DisableBottomPercentage = false
     }))
     {
         SolutionRelease solutionRelease = new SolutionRelease(name, version, leagueCDNBaseURL);
         child.Tick(String.Format("Downloaded manifest for solution {0} (version {1})", name, version));
         return(solutionRelease);
     }
 }
        public void InstallSolution(string directory, string solutionName, string solutionVersion, string localization, uint?deployMode)
        {
            if (String.Equals(solutionVersion, Constants.LatestVersionString))
            {
                solutionVersion = GetLatestSolutionRelease(solutionName);
            }

            Console.WriteLine("Downloading solution manifest for release {0}", solutionVersion);
            SolutionRelease solutionRelease = new SolutionRelease(solutionName, solutionVersion, this.LeagueCDNBaseURL);

            using (SolutionReleaseInstallation solutionReleaseInstallation = solutionRelease.CreateInstallation(directory, localization))
            {
                foreach (SolutionManifestProjectEntry project in solutionReleaseInstallation.LocalizedEntry.Projects)
                {
                    InstallProject(directory, project.Name, project.Version, deployMode, solutionName, solutionVersion);
                }
            }
        }
Beispiel #3
0
        public void InstallSolution(string directory, string solutionName, string solutionVersion, string localization, uint?deployMode)
        {
            if (String.Equals(solutionVersion, Constants.LatestVersionString))
            {
                solutionVersion = GetLatestSolutionRelease(solutionName);
            }

            using (DownloadSession downloadSession = new DownloadSession(String.Format("Installing solution {0} (version {1})", solutionName, solutionVersion)))
            {
                SolutionRelease solutionRelease = downloadSession.GetSolutionRelease(solutionName, solutionVersion, this.LeagueCDNBaseURL);

                using (SolutionReleaseInstallation solutionReleaseInstallation = solutionRelease.CreateInstallation(directory, localization))
                {
                    foreach (SolutionManifestProjectEntry project in solutionReleaseInstallation.LocalizedEntry.Projects)
                    {
                        InstallProject(downloadSession, directory, project.Name, project.Version, deployMode, solutionName, solutionVersion);
                    }
                }
            }
        }