public void Handle(OrderCooked order) { _isCooked = true; var message = new PriceOrder { Order = order.Order }; message.ReplyTo(order); _publisher.Publish(message); }
public void Handle(CookFood baseOrder) { var order = new CooksOrder(baseOrder.Order); Thread.Sleep(_cookingTime); order.Ingredients = string.Join(", ", order.Items.Select(FindIngredients)); order.CookedAt = DateTime.Now; order.CookedBy = _name; var orderCooked = new OrderCooked { Order = order.InnerItem }; orderCooked.ReplyTo(baseOrder); _publisher.Publish(orderCooked); }