public void ShowError(ProgressMonitorStatusMessage progressMessage, string error)
 {
     using (IProgressMonitor monitor = progressMonitorFactory.CreateProgressMonitor(progressMessage.Status)) {
         monitor.Log.WriteLine(error);
         monitor.ReportError(progressMessage.Error, null);
         monitor.ShowPackageConsole();
     }
 }
Example #2
0
        public void Run()
        {
            ProgressMonitorStatusMessage progressMessage = ProgressMonitorStatusMessageFactory.CreateRestoringPackagesInSolutionMessage();
            IProgressMonitor             progressMonitor = CreateProgressMonitor(progressMessage);

            try {
                RestorePackages(progressMonitor, progressMessage);
            } catch (Exception ex) {
                LoggingService.LogInternalError(ex);
                progressMonitor.Log.WriteLine(ex.Message);
                progressMonitor.ReportError(progressMessage.Error, null);
                progressMonitor.ShowPackageConsole();
                progressMonitor.Dispose();
            }
        }
        void RunInternal(IProgressMonitor progressMonitor, ProgressMonitorStatusMessage progressMessage)
        {
            var commandLine = new MonoPclCommandLine()
            {
                List = true
            };

            commandLine.BuildCommandLine();

            progressMonitor.ShowPackageConsole();
            progressMonitor.Log.WriteLine(commandLine.ToString());
            progressMonitor.Log.WriteLine();

            RunMonoPcl(progressMonitor, progressMessage, commandLine);
        }
 void ReportOutcome(
     IAsyncOperation operation,
     IProgressMonitor progressMonitor,
     ProgressMonitorStatusMessage progressMessage)
 {
     if (operation.Success)
     {
         progressMonitor.ReportSuccess(progressMessage.Success);
     }
     else
     {
         progressMonitor.ReportError(progressMessage.Error, null);
         progressMonitor.ShowPackageConsole();
     }
 }
Example #5
0
 public void Run(ProgressMonitorStatusMessage progressMessage)
 {
     using (IProgressMonitor progressMonitor = CreateProgressMonitor(progressMessage)) {
         using (PackageManagementEventsMonitor eventMonitor = CreateEventMonitor(progressMonitor)) {
             try {
                 RestorePackages(progressMonitor, progressMessage);
             } catch (Exception ex) {
                 LoggingService.LogError(progressMessage.Error, ex);
                 progressMonitor.Log.WriteLine(ex.Message);
                 progressMonitor.ReportError(progressMessage.Error, null);
                 progressMonitor.ShowPackageConsole();
                 progressMonitor.Dispose();
                 RestoreFailed = true;
             }
         }
     }
 }
        void CheckForPackageUpdatesWithProgressMonitor()
        {
            ProgressMonitorStatusMessage progressMessage = ProgressMonitorStatusMessageFactory.CreateCheckingForPackageUpdatesMessage();

            using (IProgressMonitor progressMonitor = CreateProgressMonitor(progressMessage)) {
                try {
                    using (var eventMonitor = new PackageUpdatesEventMonitor(progressMonitor)) {
                        CheckForPackageUpdates(progressMonitor, progressMessage, eventMonitor);
                    }
                } catch (Exception ex) {
                    LoggingService.LogInternalError(ex);
                    progressMonitor.Log.WriteLine(ex.Message);
                    progressMonitor.ReportError(progressMessage.Error, null);
                    progressMonitor.ShowPackageConsole();
                }
            }
        }
		protected virtual void ShowPackageConsole (IProgressMonitor progressMonitor)
		{
			progressMonitor.ShowPackageConsole ();
		}
 protected virtual void ShowPackageConsole(IProgressMonitor progressMonitor)
 {
     progressMonitor.ShowPackageConsole();
 }
		void ReportOutcome (
			IAsyncOperation operation,
			IProgressMonitor progressMonitor,
			ProgressMonitorStatusMessage progressMessage)
		{
			if (operation.Success) {
				progressMonitor.ReportSuccess (progressMessage.Success);
				packageManagementEvents.OnPackagesRestored ();
			} else {
				progressMonitor.ReportError (progressMessage.Error, null);
				progressMonitor.ShowPackageConsole ();
				RestoreFailed = true;
			}
		}
		void RunInternal (IProgressMonitor progressMonitor, ProgressMonitorStatusMessage progressMessage)
		{
			var commandLine = new MonoPclCommandLine () {
				List = true
			};
			commandLine.BuildCommandLine ();

			progressMonitor.ShowPackageConsole ();
			progressMonitor.Log.WriteLine (commandLine.ToString ());
			progressMonitor.Log.WriteLine ();

			RunMonoPcl (progressMonitor, progressMessage, commandLine);
		}
		void ReportOutcome (
			IAsyncOperation operation,
			IProgressMonitor progressMonitor,
			ProgressMonitorStatusMessage progressMessage)
		{
			if (operation.Success) {
				progressMonitor.ReportSuccess (progressMessage.Success);
			} else {
				progressMonitor.ReportError (progressMessage.Error, null);
				progressMonitor.ShowPackageConsole ();
			}
		}