InitState.cs 755 B

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