Exemplo n.º 1
0
 /// <summary>
 /// Specify an action that will execute when transitioning into
 /// the configured state.
 /// </summary>
 /// <param name="entryAction">Action to execute, providing details of the transition.</param>
 /// <param name="entryActionDescription">Action description.</param>
 /// <returns>The receiver.</returns>
 public StateConfiguration OnEntry(Action <Transition> entryAction, string entryActionDescription = null)
 {
     Enforce.ArgumentNotNull(entryAction, nameof(entryAction));
     _representation.AddEntryAction(
         (t, args) => entryAction(t),
         entryActionDescription ?? entryAction.TryGetMethodName());
     return(this);
 }
 /// <summary>
 /// Specify an action that will execute when transitioning into
 /// the configured state.
 /// </summary>
 /// <param name="entryAction">Action to execute, providing details of the transition.</param>
 /// <returns>The receiver.</returns>
 public StateConfiguration OnEntry(Action <Transition> entryAction)
 {
     Enforce.ArgumentNotNull(entryAction, "entryAction");
     m_representation.AddEntryAction((t, args) => entryAction(t));
     return(this);
 }
Exemplo n.º 3
0
 public StateConfiguration OnEntry(Action <Transition> entryAction)
 {
     mRepresentation.AddEntryAction((t, args) => entryAction(t));
     return(this);
 }