コード例 #1
0
 public void OnUpdateAllPackages(JToken arg)
 {
     try {
         var message  = arg.ToObject <UpdatePackageParams> ();
         var projects = FindProjects(message.ProjectFileNames);
         var handler  = new UpdatePackageMessageHandler(projects, message);
         handler.UpdateAllPackagesAsync(Token).WaitAndGetResult();
     } catch (Exception ex) {
         LoggingService.LogError("OnUpdateAllPackages error", ex);
         throw;
     }
 }
コード例 #2
0
 public UpdatePackageResult OnUpdatePackage(JToken arg)
 {
     try {
         var message  = arg.ToObject <UpdatePackageParams> ();
         var projects = FindProjects(message.ProjectFileNames);
         var handler  = new UpdatePackageMessageHandler(projects, message);
         handler.UpdatePackageAsync(Token).WaitAndGetResult();
         return(new UpdatePackageResult {
             IsPackageInstalled = handler.IsPackageInstalled
         });
     } catch (Exception ex) {
         LoggingService.LogError("OnUpdatePackage error", ex);
         throw;
     }
 }
コード例 #3
0
 public UpdatePackageActionList OnPreviewUpdatePackage(JToken arg)
 {
     try {
         var message  = arg.ToObject <UpdatePackageParams> ();
         var projects = FindProjects(message.ProjectFileNames);
         var handler  = new UpdatePackageMessageHandler(projects, message);
         var actions  = handler.PreviewUpdatePackageAsync(Token).WaitAndGetResult();
         return(new UpdatePackageActionList {
             IsPackageInstalled = handler.IsPackageInstalled,
             Actions = CreatePackageActionInformation(actions).ToArray()
         });
     } catch (Exception ex) {
         LoggingService.LogError("OnPreviewInstallPackage error", ex);
         throw;
     }
 }