Ejemplo n.º 1
0
 public TOutput?ExecuteTransition(TInput input)
 {
     try
     {
         var output = stateMachine.ExecuteTransition(input);
         actions?.Execute(output);
         return(output);
     }
     catch (InvalidOperationException ex)
     {
         logger?.Log(ex.Message);
         stateMachine.Reset();
         return(null);
     }
 }
 public string ExecuteTransition(string input)
 {
     try
     {
         var action = GetAction(input);
         actionRunner?.Execute(action);
         return(action);
     }
     catch (InvalidOperationException ex)
     {
         logger?.Log(ex.Message);
         stateMachine.Reset();
         return(string.Empty);
     }
 }