Пример #1
0
        public async Task Timeout(OrderExpiredTimeout state, IMessageHandlerContext context)
        {
            log.Info($"Timeout expired, OrderId = {Data.OrderId}.");

            var message = new OrderExpired
            {
                OrderId = Data.OrderId
            };
            await context.Publish(message);

            MarkAsComplete();
        }
Пример #2
0
        public void Timeout(OrderExpiredTimeout state)
        {
            if (this.Data.OrderPlaced)
            {
                return;
            }

            this.Bus.Publish <OrderAbandoned>(x =>
            {
                x.OrderId = this.Data.OrderId;
            });

            Console.WriteLine("Order Expired: " + this.Data.OrderId);
        }