TransitionInfo.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #region --------------- Copyright Dresser Wayne Pignone -------------
  2. /*
  3. * $Log: /Wrk/WayneLibraries/Wrk/StateEngine/TransitionInfo.cs $
  4. *
  5. * 2 08-03-10 16:16 Mattias.larsson
  6. * Fixed summaries.
  7. *
  8. * 1 08-03-10 15:00 Mattias.larsson
  9. * Created.
  10. */
  11. #endregion
  12. namespace Wayne.Lib.StateEngine
  13. {
  14. /// <summary>
  15. /// A class wrapping information about a transition.
  16. /// </summary>
  17. public class TransitionInfo
  18. {
  19. #region Fields
  20. private string fromStateFactoryName;
  21. private string transitionName;
  22. private string toStateFactoryName;
  23. private HistoryType historyType;
  24. #endregion
  25. #region Construction
  26. /// <summary>
  27. /// Constructor.
  28. /// </summary>
  29. /// <param name="fromStateFactoryName"></param>
  30. /// <param name="transitionName"></param>
  31. /// <param name="toStateFactoryName"></param>
  32. /// <param name="historyType"></param>
  33. public TransitionInfo(string fromStateFactoryName, string transitionName,
  34. string toStateFactoryName, HistoryType historyType)
  35. {
  36. this.fromStateFactoryName = fromStateFactoryName;
  37. this.transitionName = transitionName;
  38. this.toStateFactoryName = toStateFactoryName;
  39. this.historyType = historyType;
  40. }
  41. #endregion
  42. #region Properties
  43. /// <summary>
  44. /// The factory name of the "From" state.
  45. /// </summary>
  46. public string FromStateFactoryName
  47. {
  48. get { return fromStateFactoryName; }
  49. }
  50. /// <summary>
  51. /// The name of the transition.
  52. /// </summary>
  53. public string TransitionName
  54. {
  55. get { return transitionName; }
  56. }
  57. /// <summary>
  58. /// The factory name of the "To" state.
  59. /// </summary>
  60. public string ToStateFactoryName
  61. {
  62. get { return toStateFactoryName; }
  63. }
  64. /// <summary>
  65. /// The History Type.
  66. /// </summary>
  67. public HistoryType HistoryType
  68. {
  69. get { return historyType; }
  70. }
  71. #endregion
  72. #region Methods
  73. /// <summary>
  74. /// To string.
  75. /// </summary>
  76. /// <returns></returns>
  77. public override string ToString()
  78. {
  79. return string.Format("{0} >>{1}>> {2}", fromStateFactoryName, transitionName, toStateFactoryName);
  80. }
  81. #endregion
  82. }
  83. }