static Activity ExceptionAfterAutoConfirm()
{ return new Sequence()
{ Activities =
{ new CompensableActivity()
{ Body = new WriteLine() { Text = "Richiesta Visita inserita nel Body della CompensableActivity" }, CompensationHandler = new WriteLine() { Text = "Richiesta Visita inserita nel Body della CompensableActivity" }, ConfirmationHandler = new WriteLine() { Text = "Richiesta Visita inserita nel ConfirmationHandler" }, },
new AutoConfirm()
{ Body = new Sequence()
{ Activities =
{ new CompensableActivity()
{ Body = new WriteLine() { Text = "Prenotazione Visita inserita nel Body della CompensableActivity" }, CompensationHandler = new WriteLine() { Text = "Cancellazione Prenotazione Visita inserita nel CompensationHandler" }, ConfirmationHandler = new WriteLine() { Text = "Prenotazione Visita inserita nel ConfirmationHandler" }, },
new CompensableActivity()
{ Body = new WriteLine() { Text = "Accettazione Visita inserita nel Body della CompensableActivity" }, CompensationHandler = new WriteLine() { Text = "Cancellazione Accettazione Visita inserita nel CompensationHandler" }, ConfirmationHandler = new WriteLine() { Text = "Accettazione Visita inserita nel ConfirmationHandler" }, },
},
},
},
new CompensableActivity()
{ Body = new WriteLine() { Text = "Pagamento Visita inserita nel Body della CompensableActivity" }, CompensationHandler = new WriteLine() { Text = "Cancellazione Pagamento Visita inserita nel CompensationHandler" }, ConfirmationHandler = new WriteLine() { Text = "Pagamento Visita inserita nel ConfirmationHandler" }, },
new Throw()
{ Exception = new InArgument<Exception>((env) => new ApplicationException("Exception sollevata")), },
},
};
}