Beispiel #1
0
 /// <summary>
 /// We allow the current state to be explicitly set, without testing for allowed transitions.
 /// </summary>
 public void SetState(Enum state, T context)
 {
     stateTransitionMap[CurrentState].OnLeave(context);
     this.state = state;
     StateChange.Fire(this, EventArgs.Empty);
     stateTransitionMap[CurrentState].OnEnter(context);
 }