Exemplo n.º 1
0
        public static InstalledVersion GetNewestVersion()
        {
            InstalledVersion newestVersion = null;
            var allInstalledVersions       = InstalledVersionManager.GetAllInstalledVersionAndSortByVersionDesc();

            if (allInstalledVersions != null && allInstalledVersions.Count() > 0)
            {
                newestVersion = allInstalledVersions[0];
            }
            return(newestVersion);
        }
Exemplo n.º 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);
        }