public static StateEngine Create(SessionContext sessionContext)
        {
            var eventRulePairs = new List<EventRulePair>
                                     {
                                         new EventRulePair(EventType.PLAY, new PlayRule(sessionContext)),
                                         new EventRulePair(EventType.SETUP, new SetupRule(sessionContext)),
                                         new EventRulePair(EventType.TEARDOWN, new TearDownRule(sessionContext)),
                                         new EventRulePair(EventType.TIME_OUT, new TimeOutRule(sessionContext)),
                                         new EventRulePair(EventType.ANNOUNCE, new AnnounceRule(sessionContext))
                                     };

            var initState = new State(StateType.INIT, eventRulePairs);
            var readyState = new State(StateType.READY, eventRulePairs);
            var playingState = new State(StateType.PLAYING, eventRulePairs);

            return new StateEngine("SessionStateEngine",
                                   new List<State>
                                       {
                                           initState,
                                           readyState,
                                           playingState
                                       },
                                   StateType.INIT);
        }
 public SessionElaspedTimer(StateEngine agentStateEngine, SessionContext sessionContext)
 {
     this.agentStateEngine = agentStateEngine;
     this.sessionContext = sessionContext;
     elaspedTimer = new ElaspedTimer(SessionTimerConstants.TIMER_ELASPED_TIME, OnTimeElaspedHandler);
 }