public FSM47 <StateEnum, EventEnum> On(EventEnum eventName) { if (!_Events.ContainsKey(eventName)) { throw new InvalidOperationException("Event named " + eventName + " not declared in class constructor."); } _BuildEvent = _Events[eventName]; return(this); }
public FSM47 <StateEnum, EventEnum> In(StateEnum stateName) { if (!_States.ContainsKey(stateName)) { throw new InvalidOperationException("Unable to find key " + stateName + " in States."); } FinalizePreviousActions(); _BuildState = _States[stateName]; _BuildEvent = null; return(this); }
public FSM35 On(string eventName) { if (string.IsNullOrEmpty(eventName)) { throw new InvalidOperationException("Parameter eventName may not be null or empty."); } if (!_Events.ContainsKey(eventName)) { throw new InvalidOperationException("Event named " + eventName + " not declared in class constructor."); } _BuildEvent = _Events[eventName]; return(this); }
public FSMAction(FSMState <StateEnum> initialState, FSMEvent <EventEnum> fsmEvent, FSMState <StateEnum> finalState) { _InitialState = initialState; _Event = fsmEvent; _FinalState = finalState; }