TimerEvent.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. using System;
  12. using System.Collections.Generic;
  13. using System.Text;
  14. namespace Wayne.Lib.StateEngine
  15. {
  16. /// <summary>
  17. /// Event class for the Timer events.
  18. /// </summary>
  19. public class TimerEvent : StateEngineEvent
  20. {
  21. #region Fields
  22. private object userToken;
  23. #endregion
  24. #region Construction
  25. /// <summary>
  26. /// Initializes a new instance of the TimerEvent. This event should only be created inside the
  27. /// state machine, and does therefore not have any public constructor.
  28. /// </summary>
  29. ///<param name="userToken"></param>
  30. ///<param name="eventType"></param>
  31. internal TimerEvent(object userToken, object eventType)
  32. : base(eventType)
  33. {
  34. this.userToken = userToken;
  35. }
  36. #endregion
  37. #region Properties
  38. /// <summary>
  39. /// The UserToken of the Timer.
  40. /// </summary>
  41. public object UserToken
  42. {
  43. get
  44. {
  45. return userToken;
  46. }
  47. }
  48. #endregion
  49. }
  50. }