Example #1
0
        /// <summary>
        /// 将方法注册到消息系统里
        /// </summary>
        /// <param name="module"></param>
        void Register(ILogicModule module)
        {
            var type = module.GetType();

            var createCode = new CreateReadCode(type);
            var proxy = createCode.CreateCodeAndBuilder();
            if (proxy == null)
            {
                Logs.Error("模块 {0} 无法进行消息代理生成。", type.Name);
                return;
            }

            proxy.PacketHandlerManager = packetHandlerManager;
            proxy.SetModule(module);
            proxy.Init();
        }
        /// <summary>
        /// 将方法注册到消息系统里
        /// </summary>
        /// <param name="module"></param>
        void Register(ILogicModule module)
        {
            var type = module.GetType();

            var createCode = new CreateReadCode(type);
            var proxy      = createCode.CreateCodeAndBuilder();

            if (proxy == null)
            {
                Logs.Error("模块 {0} 无法进行消息代理生成。", type.Name);
                return;
            }

            proxy.PacketHandlerManager = packetHandlerManager;
            proxy.SetModule(module);
            proxy.Init();
        }