コード例 #1
0
 public async Task CompensateAsync(HotelReservationCreated message, ISagaContext context)
 {
     await _busPublisher.SendAsync(new CancelHotelReservation(message.ReservationId),
                                   CorrelationContext.FromId(context.CorrelationId));
 }
コード例 #2
0
 public async Task HandleAsync(OrderCanceled message, ISagaContext context)
 {
     await _busPublisher.SendAsync(new ReleaseProducts(message.Id, message.Products),
                                   CorrelationContext.FromId(context.SagaId /* CorrelationId*/));
 }
コード例 #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));
 }