ExecutionResult ExecuteContext.CompletedWithVariables(object variables)
        {
            if (variables == null)
            {
                throw new ArgumentNullException(nameof(variables));
            }

            return(new NextActivityWithVariablesExecutionResult <TArguments>(this, Publisher, _activity, RoutingSlip,
                                                                             RoutingSlipBuilder.GetObjectAsDictionary(variables)));
        }
示例#2
0
        ExecutionResult ExecuteContext.Terminate(object variables)
        {
            if (variables == null)
            {
                throw new ArgumentNullException(nameof(variables));
            }

            return(new TerminateWithVariablesExecutionResult <TArguments>(this, _publisher, _activity, _routingSlip,
                                                                          RoutingSlipBuilder.GetObjectAsDictionary(variables)));
        }
        CompensationResult CompensateContext.Compensated(object values)
        {
            if (values == null)
            {
                throw new ArgumentNullException(nameof(values));
            }

            return(new CompensatedWithVariablesCompensationResult <TLog>(this, Publisher, _compensateLog, RoutingSlip,
                                                                         RoutingSlipBuilder.GetObjectAsDictionary(values)));
        }
        ExecutionResult ExecuteContext.Completed <TLog>(object logValues)
        {
            if (logValues == null)
            {
                throw new ArgumentNullException(nameof(logValues));
            }

            if (_compensationAddress == null)
            {
                throw new InvalidCompensationAddressException(_compensationAddress);
            }

            return(new NextActivityExecutionResult <TArguments, TLog>(this, Publisher, _activity, RoutingSlip, _compensationAddress,
                                                                      RoutingSlipBuilder.GetObjectAsDictionary(logValues)));
        }
        public ExecutionResult FaultedWithVariables(Exception exception, object variables)
        {
            if (exception == null)
            {
                throw new ArgumentNullException(nameof(exception));
            }

            if (variables == null)
            {
                throw new ArgumentNullException(nameof(variables));
            }

            return(new FaultedWithVariablesExecutionResult <TArguments>(this, Publisher, _activity, RoutingSlip, exception,
                                                                        RoutingSlipBuilder.GetObjectAsDictionary(variables)));
        }
示例#6
0
        ExecutionResult ExecuteContext.CompletedWithVariables <TLog>(TLog log, object variables)
        {
            if (log == null)
            {
                throw new ArgumentNullException(nameof(log));
            }
            if (variables == null)
            {
                throw new ArgumentNullException(nameof(variables));
            }

            if (_compensationAddress == null)
            {
                throw new InvalidCompensationAddressException(_compensationAddress);
            }

            return(new NextActivityWithVariablesExecutionResult <TArguments, TLog>(this, _publisher, _activity, _routingSlip, _compensationAddress, log,
                                                                                   RoutingSlipBuilder.GetObjectAsDictionary(variables)));
        }
示例#7
0
        ExecutionResult ExecuteContext.ReviseItinerary <TLog>(TLog log, object variables, Action <ItineraryBuilder> buildItinerary)
        {
            if (log == null)
            {
                throw new ArgumentNullException(nameof(log));
            }
            if (variables == null)
            {
                throw new ArgumentNullException(nameof(variables));
            }
            if (buildItinerary == null)
            {
                throw new ArgumentNullException(nameof(buildItinerary));
            }

            if (_compensationAddress == null)
            {
                throw new InvalidCompensationAddressException(_compensationAddress);
            }

            return(new ReviseItineraryWithVariablesExecutionResult <TArguments, TLog>(this, _publisher, _activity, _routingSlip, _compensationAddress,
                                                                                      log, RoutingSlipBuilder.GetObjectAsDictionary(variables), buildItinerary));
        }