1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Wayne.Lib.StateEngine
- {
- /// <summary>
- /// Argument in the StateChanged events. It contains the new and the old state in a state transition.
- /// </summary>
- public class StateChangedEventArgs : EventArgs
- {
- #region Fields
- State oldState;
- State newState;
- Transition transition;
- #endregion
- #region Construction
- /// <summary>
- /// Constructor for the StateChanged Event Arguments
- /// </summary>
- /// <param name="oldState">The State object representing the state that was exited.</param>
- /// <param name="newState">The State object representing the state that was entered.</param>
- /// <param name="transition">The Transition.</param>
- public StateChangedEventArgs(State oldState, State newState, Transition transition)
- {
- this.oldState = oldState;
- this.newState = newState;
- this.transition = transition;
- }
- #endregion
- #region Properties
- /// <summary>
- /// The state that is exited
- /// </summary>
- public State OldState
- {
- get { return oldState; }
- }
- /// <summary>
- /// The new state that is entered.
- /// </summary>
- public State NewState
- {
- get { return newState; }
- }
- /// <summary>
- /// The Transition.
- /// </summary>
- public Transition Transition
- {
- get { return transition; }
- }
- #endregion
- }
- }
|