Ejemplo n.º 1
0
        public SagaCommandEndpoint BookHotel(ISagaCommand sagaCommand, BookingTripState sagaState)
        {
            var cmd      = (BookingTripState.BookHotelCommand)sagaCommand;
            var endpoint = new BookHotelSagaCommandEndpoint(new BookHotelMsg()
            {
                SagaId  = cmd.SagaId,
                HotelId = sagaState.HotelBookingId
            });

            endpoint.SagaCommandContext = new SagaCommandContext()
            {
                Host               = "OrderService",
                CorrelationId      = cmd.SagaId,
                DestinationAddress = "saga-book-hotel-queue",
                ReplyAddress       = "saga-book-hotel-queue-reply",
                MessageId          = Guid.NewGuid(),
                MessageType        = typeof(BookHotelMsg).AssemblyQualifiedName,
                ReplyMessageType   = typeof(BookHotelMsgReply).AssemblyQualifiedName,
                FaultMessageType   = typeof(BookHotelMsgReplyError).AssemblyQualifiedName
            };
            return(endpoint);
        }
Ejemplo n.º 2
0
 public SagaCommandEndpoint BookCar(ISagaCommand sagaCommand, BookingTripState sagaState)
 {
     return(new NoReplyCommandEndpoint());
 }
Ejemplo n.º 3
0
 public SagaCommandEndpoint  CancelHotel(ISagaCommand sagaCommand, BookingTripState sagaState)
 {
     return(new NoReplyCommandEndpoint());
 }