예제 #1
0
        public void DisablePlugin(Guid pluginId)
        {
            PluginViewModel module = _unitOfWork.PluginRepository.GetPlugin(pluginId);

            _unitOfWork.PluginRepository.SetPluginStatus(pluginId, false);
            _mvcModuleSetup.DisableModule(module.Name);
        }
        public async Task DisablePlugin(int pluginId)
        {
            PluginInfo pluginInfo = await Daos.CurrentDao.Get <PluginInfo>(pluginId);

            pluginInfo.IsEnable = false;
            await Daos.CurrentDao.Flush();

            _mvcModuleSetup.DisableModule(pluginInfo.Name);
        }
예제 #3
0
        public void DisablePlugin(Guid pluginId)
        {
            var plugin = GetPlugin(pluginId);

            if (plugin != null)
            {
                plugin.IsEnable = false;
                _myContext.Plugins.Update(plugin);
                _mvcModuleSetup.DisableModule(plugin.Name);
                _myContext.SaveChanges();
            }
        }
예제 #4
0
 public JsonResult Disable(string name)
 {
     // _pluginManager.DisablePlugin(name);
     _mvcModuleSetup.DisableModule(name);
     return(new JsonResult(new { ok = true }));
 }