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(); }
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); }