public OrderDelivered( Guid orderId, DiningLocation diningLocation, OrderItem[] orderItems) { OrderId = orderId; DiningLocation = diningLocation; OrderItems = orderItems; }
public OrderBeingPrepared( Guid orderId, DiningLocation diningLocation, OrderItem[] orderItems) { OrderId = orderId; DiningLocation = diningLocation; OrderItems = orderItems; }
public OrderQueued( Guid cashierOrderId, Guid baristaOrderId, DiningLocation diningLocation, params OrderItem[] orderItems) { CashierOrderId = cashierOrderId; BaristaOrderId = baristaOrderId; DiningLocation = diningLocation; OrderItems = orderItems; }
public QueueOrder( Guid baristaOrderId, Guid cashierOrderId, DiningLocation diningLocation, OrderItem[] orderItems) { BaristaOrderId = baristaOrderId; CashierOrderId = cashierOrderId; DiningLocation = diningLocation; OrderItems = orderItems; }
public OrderPlaced( Guid orderId, DiningLocation diningLocation, OrderItem[] orderItems, decimal price) { OrderId = orderId; DiningLocation = diningLocation; OrderItems = orderItems; Price = price; }
public OrderItemAdded( Guid orderId, DiningLocation diningLocation, OrderItem[] existingItems, OrderItem addedItem, decimal price) { OrderId = orderId; DiningLocation = diningLocation; ExistingItems = existingItems; AddedItem = addedItem; Price = price; }
private static void readDiningLocations() { string[] locations = File.ReadAllLines(@"C:\AppFiles\foodcoords.txt"); for (int i = 0; i < locations.Length; i++) { DiningLocation loc = new DiningLocation(); string[] temp = locations[i].Split(':'); loc.Name = temp[0]; loc.SubTitle = temp[1]; loc.Latitude = double.Parse(temp[2]); loc.Longitude = double.Parse(temp[3]); LocationAPI.AddDiningLocation(loc); } }
public OrderPaid( Guid orderId, DiningLocation diningLocation, OrderItem[] orderItems, decimal price, string cardHolderName, string cardNumber, Guid baristaOrderId, Guid coordinatorId) { OrderId = orderId; DiningLocation = diningLocation; OrderItems = orderItems; Price = price; CardHolderName = cardHolderName; CardNumber = cardNumber; BaristaOrderId = baristaOrderId; CoordinatorId = coordinatorId; }
public Order( Guid orderId, DiningLocation diningLocation, OrderItem[] orderItems, IProductInfo[] products) : this() { var price = orderItems .Select(i => new { product = products.Single(p => p.MenuItemId == i.MenuItemId), item = i }) .Select(i => i.item.Quantity*i.product.Price) .Sum(); var e = new OrderPlaced( orderId, diningLocation, orderItems, price); ApplyChange(e); }
private void Apply(OrderPlaced e) { Id = e.OrderId; _state = OrderState.Placed; _items.AddRange(e.OrderItems); _price = e.Price; _location = e.DiningLocation; }