Beispiel #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());
        }
Beispiel #2
0
 public void AfterInitialize(IInternalSoftPhone softPhone)
 {
     _state.AfterInitialize(softPhone);
 }
Beispiel #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());
        }