Пример #1
0
 public void OnUninstallPackage(JToken arg)
 {
     try {
         var message = arg.ToObject <UninstallPackageParams> ();
         var project = FindProject(message.ProjectFileName);
         var handler = new UninstallPackageMessageHandler(project, message);
         handler.UninstallPackageAsync(Token).WaitAndGetResult();
     } catch (Exception ex) {
         LoggingService.LogError("OnUninstallPackage error", ex);
         throw;
     }
 }
 public PackageActionList OnPreviewUninstallPackage(JToken arg)
 {
     try {
         var message = arg.ToObject <UninstallPackageParams> ();
         var project = FindProject(message.ProjectFileName);
         var handler = new UninstallPackageMessageHandler(project, message);
         var actions = handler.PreviewUninstallPackageAsync(Token).WaitAndGetResult();
         return(new PackageActionList {
             Actions = CreatePackageActionInformation(actions).ToArray()
         });
     } catch (Exception ex) {
         LoggingService.LogError("OnPreviewUninstallPackage error", ex);
         throw;
     }
 }