PseudoState.cs 820 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Wayne.Lib.StateEngine.Generic
  5. {
  6. /// <summary>
  7. /// Generic pseudo state class that has a main object of a generic type.
  8. /// </summary>
  9. /// <typeparam name="TMain">Specifies the type of the main object.</typeparam>
  10. public abstract class PseudoState<TMain> : PseudoState, IGenericState<TMain>
  11. {
  12. #region Properties
  13. /// <summary>
  14. /// The main object.
  15. /// </summary>
  16. protected TMain Main
  17. {
  18. get;
  19. private set;
  20. }
  21. #endregion
  22. #region IGenericState<TMain> Members
  23. TMain IGenericState<TMain>.WritableMain
  24. {
  25. get { return Main; }
  26. set { Main = value; }
  27. }
  28. #endregion
  29. }
  30. }