Exemple #1
0
        /// <summary>
        /// Handle the event.
        /// </summary>
        /// <param name="event">The <see cref="IEvent"/> to handle.</param>
        public Task HandleAsync(PaymentAccepted @event)
        {
            this.spy.Spy("PaymentAccepted");
            OrderConfirmed orderConfirmed = new OrderConfirmed(this.Id);

            return(this.EventContext.Request.Processor.PublishAsync(orderConfirmed));
        }
partial         void HandleImplementation(PaymentAccepted message)
        {
            // TODO: PaymentAcceptedHandler: Add code to handle the PaymentAccepted message.
            Console.WriteLine("Paying received " + message.GetType().Name);

            var paymentNotification = new PaymentEngine.Internal.Commands.Paying.PaymentNotification();
            Bus.Send(paymentNotification);
        }
        partial void HandleImplementation(PaymentAccepted message)
        {
            // TODO: PaymentAcceptedHandler: Add code to handle the PaymentAccepted message.
            Console.WriteLine("Paying received " + message.GetType().Name);

            var paymentNotification = new PaymentEngine.Internal.Commands.Paying.PaymentNotification();

            Bus.Send(paymentNotification);
        }
        public void Handle(PaymentAccepted message)
        {
            // Store message in Saga Data for later use
            this.Data.PaymentAccepted = message;
            // Handle message on partial class
            this.HandleImplementation(message);

            // Check if Saga is Completed
            CheckIfAllMessagesReceived();
        }
 partial void HandleImplementation(PaymentAccepted message);