TimerEvent.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #region --------------- Copyright Dresser Wayne Pignone -------------
  2. /*
  3. * $Log: /Wrk/WayneLibraries/Wrk/StateEngine/TimerEvent.cs $
  4. *
  5. * 2 08-03-18 11:09 roger.månsson
  6. * Each timer does not have it's own real timer anymore. Instead there are
  7. * a pool of timers in the StateMachine that can be shared among the
  8. * timers in the same state machine.
  9. */
  10. #endregion
  11. namespace Wayne.Lib.StateEngine
  12. {
  13. /// <summary>
  14. /// Event class for the Timer events.
  15. /// </summary>
  16. public class TimerEvent : StateEngineEvent
  17. {
  18. #region Fields
  19. private object userToken;
  20. #endregion
  21. #region Construction
  22. /// <summary>
  23. /// Initializes a new instance of the TimerEvent. This event should only be created inside the
  24. /// state machine, and does therefore not have any public constructor.
  25. /// </summary>
  26. ///<param name="userToken"></param>
  27. ///<param name="eventType"></param>
  28. internal TimerEvent(object userToken, object eventType)
  29. : base(eventType)
  30. {
  31. this.userToken = userToken;
  32. }
  33. #endregion
  34. #region Properties
  35. /// <summary>
  36. /// The UserToken of the Timer.
  37. /// </summary>
  38. public object UserToken
  39. {
  40. get
  41. {
  42. return userToken;
  43. }
  44. }
  45. #endregion
  46. }
  47. }