/// <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)); }
/// <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); }
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 { } }
/// <summary> /// 放入一个QQActor到队列,将会在线程执行器里面执行 /// </summary> /// <param name="actor"></param> public void PushActor(QQActor actor) { _actorDispatcher.PushActor(actor); }