public void UpdateProduct(string slug, string version, Article product, bool isLive = false, bool createVersions = false) { var definition = _contentDefinitionService.GetServiceDefinition(slug, version); _productUpdateService.Update(product, new ProductDefinition { ProdictTypeId = 0, StorageSchema = definition.Content }, isLive, createVersions); }
private void OnUpdateLinkClick(object sender, RoutedEventArgs e) { HideUpdateBar(); UpdateStarting(this, EventArgs.Empty); // invoke with priority as Background so that our window is closed first before the Update method is called. NuGetUIThreadHelper.JoinableTaskFactory.StartOnIdle(() => { _productUpdateService.Update(); }); }
public IActionResult Put([FromBody] ProductUpdateRequest updateRequest) { var response = new Response(); try { _productUpdateService.Update(updateRequest); response.Success = true; response.Message = "Se ha modificado correctamente"; } catch (Exception exception) { Console.WriteLine(exception); response.Message = exception.Message; } return(Ok(response)); }
private PackageManagerWindow(Project project, DTE dte, IVsPackageManagerFactory packageManagerFactory, IPackageRepositoryFactory repositoryFactory, IPackageSourceProvider packageSourceProvider, IHttpClientEvents httpClientEvents, IProductUpdateService productUpdateService, IPackageRestoreManager packageRestoreManager, ISolutionManager solutionManager, IOptionsPageActivator optionPageActivator, IDeleteOnRestartManager deleteOnRestartManager, IVsShell4 vsRestarter, string dialogParameters) : base(F1Keyword) { InitializeComponent(); #if !VS10 // set unique search guid for VS11 explorer.SearchCategory = new Guid("{85566D5F-E585-411F-B299-5BF006E9F11E}"); #endif _httpClientEvents = httpClientEvents; if (_httpClientEvents != null) { _httpClientEvents.SendingRequest += OnSendingRequest; } _productUpdateService = productUpdateService; _optionsPageActivator = optionPageActivator; _activeProject = project; // replace the ConsoleOutputProvider with SmartOutputConsoleProvider so that we can clear // the console the first time an entry is written to it var providerServices = new ProviderServices(); _smartOutputConsoleProvider = new SmartOutputConsoleProvider(providerServices.OutputConsoleProvider); providerServices.OutputConsoleProvider = _smartOutputConsoleProvider; _providerSettings = providerServices.ProviderSettings; _updateAllUIService = providerServices.UpdateAllUIService; providerServices.ProgressWindow.UpgradeNuGetRequested += (_, __) => { Close(); productUpdateService.Update(); }; AddUpdateBar(productUpdateService); AddRestoreBar(packageRestoreManager); var restartRequestBar = AddRestartRequestBar(deleteOnRestartManager, vsRestarter); InsertDisclaimerElement(); AdjustSortComboBoxWidth(); PreparePrereleaseComboBox(); InsertUpdateAllButton(providerServices.UpdateAllUIService); SetupProviders( project, dte, packageManagerFactory, repositoryFactory, packageSourceProvider, providerServices, httpClientEvents, solutionManager, packageRestoreManager, restartRequestBar); ProcessDialogParameters(dialogParameters); }