private void AddSubTransition(SemanticTransition semanticTransition, OptimizedStateMachine.OptimizedTransition transition) { eventsForThisState.Add(semanticTransition.Event); var subTransition = new SubTransitionOptimizer(semanticTransition, currentState).Optimize(); transition.Subtransitions.Add(subTransition); }
private void AddStateTransitions(OptimizedStateMachine.OptimizedTransition transition, State state) { foreach (var semanticTransition in state.Transitions) { if (EventExistsAndHasNotBeenOverridden(semanticTransition.Event)) { AddSubTransition(semanticTransition, transition); } } }
public IEnumerable <OptimizedStateMachine.OptimizedTransition> AddTransitionsForState() { var transition = new OptimizedStateMachine.OptimizedTransition { CurrentState = currentState.Name }; AddSubTransitions(transition); transitions.Add(transition); return(transitions); }