コード例 #1
0
ファイル: PluginManager.cs プロジェクト: pentest30/Mystique
        public void DisablePlugin(Guid pluginId)
        {
            PluginViewModel module = _unitOfWork.PluginRepository.GetPlugin(pluginId);

            _unitOfWork.PluginRepository.SetPluginStatus(pluginId, false);
            _mvcModuleSetup.DisableModule(module.Name);
        }
コード例 #2
0
        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 }));
 }