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