IStateFactory.cs 940 B

1234567891011121314151617181920212223242526
  1. namespace Wayne.Lib.StateEngine
  2. {
  3. /// <summary>
  4. /// Interface for State Factories. The factories are added to the state machine, and are used to
  5. /// create the actual state objects. The Wayne.Lib.StateEngine library does not provide any implementation
  6. /// for this interface, it must be implemented in each application.
  7. /// </summary>
  8. public interface IStateFactory
  9. {
  10. #region Properties
  11. /// <summary>
  12. /// Create a state object from the specified State name.
  13. /// </summary>
  14. /// <param name="stateFactoryName">Name of the state to be created.</param>
  15. /// <returns>If successful, it returns the object for the state name. If it not was found, it returns null.</returns>
  16. State CreateState(string stateFactoryName);
  17. /// <summary>
  18. /// Name of the state facory.
  19. /// </summary>
  20. string Name { get; }
  21. #endregion
  22. }
  23. }