Esempio n. 1
0
 /// <summary>
 /// 执行一个QQActor,返回是否继续下一个actor
 /// </summary>
 /// <param name="actor"></param>
 /// <returns></returns>
 private bool DispatchAction(QQActor actor)
 {
     if (actor == null)
     {
         return(true);
     }
     actor.Execute();
     return(!(actor is ExitActor));
 }
Esempio n. 2
0
 /// <summary>
 /// 执行一个QQActor,返回是否继续下一个actor
 /// </summary>
 /// <param name="actor"></param>
 /// <returns></returns>
 private bool DispatchAction(QQActor actor)
 {
     if (actor == null)
     {
         return true;
     }
     actor.Execute();
     return !(actor is ExitActor);
 }
Esempio n. 3
0
        public void PushActor(QQActor actor)
        {
            try
            {
                switch (actor.Type)
                {
                case QQActorType.PollMsgActor:
                    _pollActorQueue.Add(actor);
                    break;

                case QQActorType.GetRobotReply:
                    _actorQueue.Add(actor);
                    break;

                default:
                    _actorQueue.Add(actor);
                    break;
                }
            }
            catch { }
        }
Esempio n. 4
0
        public void PushActor(QQActor actor)
        {
            try
            {
                switch (actor.Type)
                {
                    case QQActorType.PollMsgActor:
                    _pollActorQueue.Add(actor);
                    break;

                    case QQActorType.GetRobotReply:
                    _actorQueue.Add(actor);
                    break;

                    default:
                    _actorQueue.Add(actor);
                    break;
                }
            }
            catch { }
        }
Esempio n. 5
0
 /// <summary>
 /// 放入一个QQActor到队列,将会在线程执行器里面执行
 /// </summary>
 /// <param name="actor"></param>
 public void PushActor(QQActor actor)
 {
     _actorDispatcher.PushActor(actor);
 }