Beispiel #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();
        }
Beispiel #2
0
        /// <summary>
        /// 删除插件信息
        /// </summary>
        public void DeletePluginClass(int id)
        {
            var manager = new PluginClassManager();
            var entity  = manager.QueryPluginClassById(id);

            manager.DeletePluginClass(entity);
            BusinessHelper.ClearPlugin();
        }