예제 #1
0
 private void Output(Tuple <Enums.DiagramMode, Enums.DiagramMode> transition)
 {
     if ((PreviousStateShouldMatch == Enums.DiagramMode.Any || StateTransition.CurrentStateMatches(PreviousStateShouldMatch)) &&
         (CurrentStateShouldMatch == Enums.DiagramMode.Any || StateTransition.CurrentStateMatches(CurrentStateShouldMatch)))
     {
         stateChanged?.Execute();
         if (currentStateOutput != null)
         {
             currentStateOutput.Data = StateTransition.CurrentState;
         }
         if (currentStateAsStringOutput != null)
         {
             currentStateAsStringOutput.Data = Enum.GetName(typeof(Enums.DiagramMode), StateTransition.CurrentState);
         }
         if (transitionOutput != null)
         {
             transitionOutput.Data = transition;
         }
     }
 }