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; } }
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; } }
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; } }