Exemple #1
0
        public void PlaceOrder(int orderNumber, int table, params Order.Item[] items)
        {
            var tookOrderOn = DateTime.UtcNow;
            var order = new Order(orderNumber) {Table = table, Waiter = name, TookOrderOn = tookOrderOn};
            items.ForEach(order.Add);

            var customerWalksOutAt = tookOrderOn.AddSeconds(30);

            if (random.NextDouble() > 0.75)
            {
                next.Publish(new Messages.OrderPlaced(order, customerWalksOutAt));
            }
            else
            {
                next.Publish(new Messages.SuspectOrderPlaced(order, customerWalksOutAt));
            }
        }
 public void Report(Order message)
 {
 }