public StateType GetTargetStateType(TransitionType transition) { if (TransitionStateMap.ContainsKey(transition)) { return(TransitionStateMap[transition]); } return(StateType.Error); }
public bool AddTransition(TransitionType transition, StateType targetState) { if (transition == TransitionType.Error || targetState == StateType.Error) { return(false); } if (TransitionStateMap.ContainsKey(transition)) { return(false); } TransitionStateMap.Add(transition, targetState); return(true); }