Пример #1
0
 public UpdateInstallationLogEntry(string kbArticleId, InstallationStatus status, string message, DateTime processedTime)
 {
     KbArticleId = kbArticleId;
     UpdateInstallationStatus = status;
     Message       = message;
     ProcessedTime = processedTime;
 }
Пример #2
0
        private InstallationDataModel UpdateState(InstallationDataModel model, InstallationStatus status)
        {
            InstallationDataModel copy = model;

            copy.Status = status;
            return(copy);
        }
Пример #3
0
        static string DisplayInstallStatusString(InstallationStatus installStatus)
        {
            switch (installStatus)
            {
            case InstallationStatus.Unknown:
                return("");

            case InstallationStatus.Installed:
                return("");

            case InstallationStatus.InstallQueued:
                return("Install queued");

            case InstallationStatus.Installing:
                return("Installing...");

            case InstallationStatus.UpdateAvailable:
                return("");

            case InstallationStatus.UpdateQueued:
                return("Update Queued");

            case InstallationStatus.Updating:
                return("Updating...");

            case InstallationStatus.UninstallQueued:
                return("Uninstall Queued");

            case InstallationStatus.Uninstalling:
                return("Uninstalling...");
            }

            return("");
        }
Пример #4
0
        public bool LoadFromFile()
        {
            if (File.Exists(@InstallPath + @"/Version.json"))
            {
                var temp = JsonConvert.DeserializeObject <InstallationDataModel>(File.ReadAllText(@InstallPath + @"/Version.json"));
                this.Files = temp.Files;
                this.InstallationChecksum = temp.InstallationChecksum;
                this.MissingFiles         = temp.MissingFiles;
                this.TotalSize            = temp.TotalSize;
                this.RemainingSize        = temp.RemainingSize;
                this.Status        = temp.Status;
                this.VersionBranch = temp.VersionBranch;
                this.VersionName   = temp.VersionName;

                return(true);
            }
            return(false);
        }
Пример #5
0
        /// <summary>
        /// Checks the registry whether the system has the latest BuildXL VS plugin
        /// </summary>
        public static string GetVersionsNotHavingLatestPlugin()
        {
#if !DISABLE_FEATURE_VSEXTENSION_INSTALL_CHECK
            InstallationStatus vs2015Status = InstallationStatus.VsNotInstalled;
            InstallationStatus vs2017Status = InstallationStatus.VsNotInstalled;

            try
            {
                var visualStudioAppDataDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Microsoft\VisualStudio");
                foreach (var dir in Directory.GetDirectories(visualStudioAppDataDir))
                {
                    string name = Path.GetFileName(dir);
                    if (name.StartsWith("14.", StringComparison.OrdinalIgnoreCase))
                    {
                        vs2015Status = IsPluginInstalledIn2015(name);
                    }
                    else if (name.StartsWith("15.", StringComparison.OrdinalIgnoreCase))
                    {
                        vs2017Status = IsPluginInstalledIn2017(name) ? InstallationStatus.BothInstalled : InstallationStatus.PluginNotInstalled;
                    }
                }
            }
#pragma warning disable ERP022 // Unobserved exception in generic exception handler
            catch
            {
                // If there are problems to find the VS directories under the AppData folder, just check with the VS 2015's default version (14.0).
                vs2015Status = IsPluginInstalledIn2015("14.0");
            }
#pragma warning restore ERP022 // Unobserved exception in generic exception handler

            if (vs2015Status == InstallationStatus.PluginNotInstalled)
            {
                return(vs2017Status == InstallationStatus.PluginNotInstalled ? "VS2015 and VS2017" : "VS2015");
            }
            else if (vs2017Status == InstallationStatus.PluginNotInstalled)
            {
                return("VS2017");
            }
#endif

            return(null);
        }
Пример #6
0
        public void ReportStatus(InstallationStatus installationStatus)
        {
            switch (installationStatus)
            {
            case InstallationStatus.ExtractFile:
                MessageChanged?.Invoke(this, "Extract file");
                break;

            case InstallationStatus.WriteConfig:
                MessageChanged?.Invoke(this, "Write config");
                break;

            case InstallationStatus.CopyFiles:
                MessageChanged?.Invoke(this, "Copy files");
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(installationStatus), installationStatus, null);
            }
        }
Пример #7
0
 public InstallInfo(InstallationStatus status, IEnumerable <ModCollision> conflicts)
 {
     this.status    = status;
     this.conflicts = conflicts;
 }
Пример #8
0
 public InstallInfo(InstallationStatus status)
     : this(status, new ModCollision[0])
 {
 }
Пример #9
0
		public ImportedKit(string name, object instance, InstallationStatus status)
		{
			Name = name;
			Instance = (KitController)instance;
			Status = status;
		}
Пример #10
0
 public ImportedKit(string name, object instance, InstallationStatus status)
 {
     Name     = name;
     Instance = (KitController)instance;
     Status   = status;
 }