示例#1
0
        /// <summary>
        ///     Called when configuring the behavior that is executed upon leaving a state
        /// </summary>
        /// <typeparam name="T"> </typeparam>
        /// <param name="leaveEvent"> The leave event. </param>
        /// <param name="configureEvent"> The configure event. </param>
        /// <returns> </returns>
        public IStateConfiguration OnLeave <T> (T leaveEvent, Action <T> configureEvent) where T : IStateEvent
        {
            Leave.Add(leaveEvent);

            configureEvent(leaveEvent);

            return(this);
        }
示例#2
0
 /// <summary>
 ///     Called when configuring the behavior that is executed upon leaving a state
 /// </summary>
 /// <typeparam name="T"> </typeparam>
 public IStateConfiguration OnLeave <T> (Func <T> configureAction) where T : class, IStateEvent
 {
     Leave.Add(configureAction( ));
     return(this);
 }
示例#3
0
 /// <summary>
 ///     Called when configuring the behavior that is executed upon leaving a state
 /// </summary>
 /// <param name="stateEvent"> The state event. </param>
 /// <returns> </returns>
 public IStateConfiguration OnLeave(IStateEvent stateEvent)
 {
     Leave.Add(stateEvent);
     return(this);
 }