示例#1
0
        public override bool ShutDownLogicSystem()
        {
            IsLogicEnd = true;

            LogicHandler.DestroyLogic();

            return(true);
        }
示例#2
0
        public override bool CreateLogicSystem(LogicEntry logicEntry)
        {
            if (LogicHandler.Initialize(logicEntry) == false)
            {
                return(false);
            }

            IsLogicEnd = false;

            Task.Factory.StartNew(new Action(LogicThreadProcess));
            Task.Factory.StartNew(new Action(RPCThreadProcess));

            return(true);
        }
示例#3
0
        public void LogicThreadProcess()
        {
            while (IsLogicEnd == false)
            {
                LogicWait.WaitOne();

                BasePacket packet;

                do
                {
                    packet = LogicGateWay.PopPacket();

                    if (packet != null)
                    {
                        LogicHandler.ProcessPacket(packet);
                    }
                } while (LogicGateWay.Count() != 0);
            }
        }