Example #1
0
        public LeagueRADSProjectRelease GetLatestRelease()
        {
            LeagueRADSProjectRelease latestRelease = null;

            foreach (LeagueRADSProjectRelease release in this.Releases)
            {
                uint releaseValue = LeagueRADSInstallation.GetReleaseValue(release.Version);
                if (latestRelease == null || releaseValue > latestRelease.VersionValue)
                {
                    latestRelease = release;
                }
            }
            return(latestRelease);
        }
        private LeagueRADSProjectRelease GetProjectLatestRelease(string projectName)
        {
            LeagueRADSProject foundProject = GetProject(projectName);

            if (foundProject == null)
            {
                throw new ProjectNotFoundException();
            }
            LeagueRADSProjectRelease foundProjectRelease = foundProject.GetLatestRelease();

            if (foundProjectRelease == null)
            {
                throw new ProjectReleaseNotFoundException();
            }
            return(foundProjectRelease);
        }