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

            _unitOfWork.PluginRepository.SetPluginStatus(pluginId, true);

            _mvcModuleSetup.EnableModule(module.Name);
        }
コード例 #2
0
        public async Task EnablePlugin(int pluginId)
        {
            PluginInfo pluginInfo = await Daos.CurrentDao.Get <PluginInfo>(pluginId);

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

            _mvcModuleSetup.EnableModule(pluginInfo.Name);
        }
コード例 #3
0
        public void EnablePlugin(Guid pluginId)
        {
            var plugin = GetPlugin(pluginId);

            if (plugin != null)
            {
                plugin.IsEnable = true;
                _myContext.Plugins.Update(plugin);
                _mvcModuleSetup.EnableModule(plugin.Name);
                _myContext.SaveChanges();
            }
        }
コード例 #4
0
 public JsonResult Enable(string name)
 {
     _mvcModuleSetup.EnableModule(name);
     return(new JsonResult(new { ok = true }));
 }