Exemplo n.º 1
0
        public void ChangeState(ISoftPhoneState state)
        {
            Check.IsTrue(!state.Equals(InternalState), string.Format("Can not change state to '{0}'. The phone is already in '{0}' state", this.InternalState.GetType().Name));

            InternalState.Terminate(this);

            state.Initialize(this);

            InternalState = state;

            state.AfterInitialize(this);
            /*fire internal event*/
            InternalStateChanged(this, new EventArgs());
        }
Exemplo n.º 2
0
        public void Initialize(IInternalSoftPhone softPhone)
        {
            _state.Initialize(softPhone);

            _afterInitialized(softPhone);//TODO: rename
        }
Exemplo n.º 3
0
        public void ChangeState(ISoftPhoneState state)
        {
            Check.IsTrue(!state.Equals(InternalState), string.Format("Can not change state to '{0}'. The phone is already in '{0}' state",  this.InternalState.GetType().Name));

            InternalState.Terminate(this);

            state.Initialize(this);

            InternalState = state;
            
            state.AfterInitialize(this);
            /*fire internal event*/
            InternalStateChanged(this, new EventArgs());
        }