12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- namespace Wayne.Lib.StateEngine.TestExtensions
- {
-
-
-
- public static class TimerTestExtension
- {
-
-
-
-
- public static void FireTimers(StateMachine stateMachine)
- {
- State currentState = stateMachine.CurrentStateRecursive;
- do
- {
- Console.WriteLine("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF");
- Console.WriteLine("FireTimers: Fireing {0} timers in {1}", currentState.ParentStateMachine.timerWrapperList.Count, currentState.ParentStateMachine.Name);
- Console.WriteLine("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF");
- List<TimerWrapper> tempTimerWrapperList = new List<TimerWrapper>(currentState.ParentStateMachine.timerWrapperList);
- foreach (var timerwrapper in tempTimerWrapperList)
- timerwrapper.Fire();
- currentState = currentState.ParentState;
- } while (currentState != null);
- }
- }
- }
|