Beispiel #1
0
 public async Task Handle(CancelHotelRequest message, IMessageHandlerContext context)
 {
     Log.Info($"Hotel for Trip Id {message.TripId} is canceled");
     var result = new BookingHotelResponse {
         TripId = message.TripId, IsBooked = false
     };
     await context.Publish(result);
 }
Beispiel #2
0
 private async Task CancelHotel(IMessageHandlerContext context)
 {
     Log.Info($"Sending cancel hotel request for Trip Id {Data.TripId}");
     Data.OrderStatuses[OrderType.Hotel] = OrderStatus.CancelRequestIsSent;
     var command = new CancelHotelRequest {
         TripId = Data.TripId
     };
     await context.Send(command);
 }