コード例 #1
0
        internal void ChangeState(AbstractCtxState newstate)
        {
            if (_logger.IsDebugEnabled)
            {
                _logger.Debug("InviteCtx[Id={0}]. State transition: '{1}'-->'{2}'", GetId(), State != null ? State.Name.ToString() : "", newstate.Name);
            }

            /*attention: no locking. Is already called thread safely via call to AdaptToResponse*/
            State = newstate;
            newstate.Initialize(this);

            if (_stateObserver != null)
            {
                _stateObserver.OnNext(CreateStateInfo(newstate.Name));
            }
        }
コード例 #2
0
        internal void ChangeState(AbstractCtxState newstate)
        {
            if (_logger.IsDebugEnabled) _logger.Debug("InviteCtx[Id={0}]. State transition: '{1}'-->'{2}'", GetId(), State != null ? State.Name.ToString() : "", newstate.Name);

            /*attention: no locking. Is already called thread safely via call to AdaptToResponse*/
            State = newstate;
            newstate.Initialize(this);

               if(_stateObserver != null) _stateObserver.OnNext(CreateStateInfo(newstate.Name));
        }