Ejemplo n.º 1
0
        public Guid PlaceOrder()
        {
            var order = new Order {
                TableNumber = _counter++
            };

            order.AddItem(3, "French Fries", 1);

            var orderPlaced = new OrderPlaced(order);

            _publisher.Publish(orderPlaced);
            return(orderPlaced.CorrelationId);
        }
Ejemplo n.º 2
0
 public void Handle(OrderPlaced message)
 {
     _publisher.Publish(new PublishAt(DateTime.Now.AddSeconds(5.0), new CookFoodTimedOut(message.Order, message.CorrelationId, message.Id)));
     _publisher.Publish(new CookFood(message.Order, message.CorrelationId, message.Id));
 }
Ejemplo n.º 3
0
 public void Handle(OrderPlaced message)
 {
     _publisher.Publish(new CalculateOrder(message.Order, message.CorrelationId, message.Id));
 }