Ejemplo n.º 1
0
        /// <summary>
        /// 更新插件信息
        /// </summary>
        public void UpdatePluginClass(PluginClassInfo pluginClass, int id)
        {
            using (var biz = new GameBizBusinessManagement())
            {
                biz.BeginTran();

                var manager = new PluginClassManager();
                var entity  = manager.QueryPluginClassById(id);

                if (entity == null)
                {
                    throw new Exception("插件信息未被查询到");
                }
                entity.AssemblyFileName = pluginClass.AssemblyFileName;
                entity.ClassName        = pluginClass.ClassName;
                entity.EndTime          = pluginClass.EndTime;
                entity.InterfaceName    = pluginClass.InterfaceName;
                entity.IsEnable         = pluginClass.IsEnable;
                entity.OrderIndex       = pluginClass.OrderIndex;
                entity.StartTime        = pluginClass.StartTime;

                manager.UpdatePluginClass(entity);

                biz.CommitTran();
            }
            BusinessHelper.ClearPlugin();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 更新插件相关信息
 /// </summary>
 public CommonActionResult UpdatePluginClass(PluginClassInfo pluginClass, int id)
 {
     try
     {
         new PluginClassBusiness().UpdatePluginClass(pluginClass, id);
         return(new CommonActionResult(true, "操作成功"));
     }
     catch (Exception ex)
     {
         throw new Exception("更新插件信息出错 - " + ex.Message, ex);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 添加插件相关信息
 /// </summary>
 public CommonActionResult AddPluginClass(PluginClassInfo pluginClass)
 {
     try
     {
         new PluginClassBusiness().AddPluginClass(pluginClass);
         return(new CommonActionResult(true, "操作成功"));
     }
     catch (Exception ex)
     {
         throw new Exception("添加插件信息出错 - " + ex.Message, ex);
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 添加插件类信息
        /// </summary>
        public void AddPluginClass(PluginClassInfo pluginClass)
        {
            using (var biz = new GameBizBusinessManagement())
            {
                biz.BeginTran();

                var manager = new PluginClassManager();
                var entity  = new PluginClass()
                {
                    AssemblyFileName = pluginClass.AssemblyFileName,
                    ClassName        = pluginClass.ClassName,
                    EndTime          = pluginClass.EndTime,
                    InterfaceName    = pluginClass.InterfaceName,
                    IsEnable         = pluginClass.IsEnable,
                    OrderIndex       = pluginClass.OrderIndex,
                    StartTime        = pluginClass.StartTime,
                };
                manager.AddPluginClass(entity);

                biz.CommitTran();
            }

            BusinessHelper.ClearPlugin();
        }