Example #1
0
        private static InstalledVersion GetNewestVersion()
        {
            InstalledVersion newestVersion = null;
            var allInstalledVersions       = InstalledVersionManager.GetAllInstalledVersionAndSortByVersionDesc();

            if (allInstalledVersions != null &&
                allInstalledVersions.Count() > 0)
            {
                newestVersion = allInstalledVersions[0];
            }
            return(newestVersion);
        }
Example #2
0
        private static string GetExistPathByVersion(int version)
        {
            var path = string.Empty;
            var allInstalledVersions = InstalledVersionManager.GetAllInstalledVersionAndSortByVersionDesc();

            if (allInstalledVersions != null && allInstalledVersions.Count() > 0)
            {
                InstalledVersion installedVersion = allInstalledVersions.SingleOrDefault(k => k.Version == version);
                if (installedVersion != null)
                {
                    path = installedVersion.Path;
                }
            }
            return(path);
        }