コード例 #1
0
ファイル: ActorContext.cs プロジェクト: xiaofneglin/Dotsero
        /// <summary>
        /// Pops the stack of the behaviors that the Actor may have
        /// and sets the OnReceiveDelegate to the previous.
        /// </summary>
        public void Unbecome()
        {
            if (Receivers.Count > 1)
            {
                Receivers.Pop();
            }

            Receive = Receivers.Pop();

            Channel.ClearSubscribers();

            Channel.Subscribe(Fiber, GetOnReceiveDelegate());
        }