Beispiel #1
0
 public void Execute(CancellationToken cancellationToken)
 {
     try {
         using (var monitor = new NuGetPackageEventsMonitor(dotNetProject, packageManagementEvents)) {
             ExecuteAsync(cancellationToken).Wait();
         }
     } catch (AggregateException ex) {
         Exception baseException = ex.GetBaseException();
         if (baseException.InnerException is PackageAlreadyInstalledException)
         {
             context.Log(MessageLevel.Info, baseException.Message);
         }
         else
         {
             throw;
         }
     }
 }
 public void Execute(CancellationToken cancellationToken)
 {
     using (var monitor = new NuGetPackageEventsMonitor(dotNetProject, packageManagementEvents)) {
         ExecuteAsync(cancellationToken).Wait();
     }
 }
		public void Execute (CancellationToken cancellationToken)
		{
			using (var monitor = new NuGetPackageEventsMonitor (dotNetProject, packageManagementEvents)) {
				ExecuteAsync (cancellationToken).Wait ();
			}
		}
		public void Execute (CancellationToken cancellationToken)
		{
			try {
				using (var monitor = new NuGetPackageEventsMonitor (dotNetProject, packageManagementEvents)) {
					ExecuteAsync (cancellationToken).Wait ();
				}
			} catch (AggregateException ex) {
				Exception baseException = ex.GetBaseException ();
				if (baseException.InnerException is PackageAlreadyInstalledException) {
					context.Log (MessageLevel.Info, baseException.Message);
				} else {
					throw;
				}
			}
		}