public IActionResult Disable(Guid id) { var module = _pluginManager.GetPlugin(id); _pluginManager.DisablePlugin(id); var moduleName = module.Name; var last = _partManager.ApplicationParts.First(p => p.Name == moduleName); _partManager.ApplicationParts.Remove(last); MyActionDescriptorChangeProvider.Instance.HasChanged = true; MyActionDescriptorChangeProvider.Instance.TokenSource.Cancel(); return(RedirectToAction("Index")); }
public ActionResult DisablePlugin([FromRoute, Required] Guid pluginId, [FromRoute, Required] Version version) { var plugin = _pluginManager.GetPlugin(pluginId, version); if (plugin == null) { return NotFound(); } _pluginManager.DisablePlugin(plugin); return NoContent(); }
public IActionResult Disable(Guid id) { _pluginManager.DisablePlugin(id); return(RedirectToAction("Index")); }