Exemple #1
0
 public async Task CompensateAsync(HotelReservationCreated message, ISagaContext context)
 {
     await _busPublisher.SendAsync(new CancelHotelReservation(message.ReservationId),
                                   CorrelationContext.FromId(context.CorrelationId));
 }
Exemple #2
0
 public async Task HandleAsync(OrderCanceled message, ISagaContext context)
 {
     await _busPublisher.SendAsync(new ReleaseProducts(message.Id, message.Products),
                                   CorrelationContext.FromId(context.SagaId /* CorrelationId*/));
 }
Exemple #3
0
 public async Task HandleAsync(HotelReservationCreated message, ISagaContext context)
 {
     await _busPublisher.SendAsync(new CreateFlightReservation(message.UserId, message.StartDate, message.EndDate),
                                   CorrelationContext.FromId(context.CorrelationId));
 }