Beispiel #1
0
 public RejectedByPreconditionResult(
     object startingState,
     object signal,
     StateMachineDefinition.Transition transition,
     AggregateException preconditionExceptions)
 {
     StartingState          = startingState;
     Signal                 = signal;
     Transition             = transition;
     PreconditionExceptions = preconditionExceptions;
 }
Beispiel #2
0
        public ExceptionThrownByPreconditionResult(
            object startingState,
            object signal,
            StateMachineDefinition.Transition transition,
            Exception preconditionException)
        {
            StartingState = startingState;
            Signal        = signal;
            Transition    = transition;

            if (preconditionException is AggregateException aggregateException)
            {
                PreconditionExceptions = aggregateException;
            }
            else
            {
                PreconditionExceptions = new AggregateException(preconditionException);
            }
        }