Пример #1
0
 private OrderDetails(
     OrderId id,
     OrderNumber orderNumber,
     Roubles totalPrice,
     Status status
     ) =>
 (Id, OrderNumber, TotalPrice, Status) =
Пример #2
0
 private BookedOrder(
     OrderId orderId,
     OrderNumber orderNumber,
     Roubles totalPrice,
     BookedItem[] items
     ) =>
 (Id, OrderNumber, TotalPrice, Items) =
Пример #3
0
 private DrinkSize(
     DrinkSizeId id,
     Name name,
     Volume volume,
     Roubles price
     ) =>
 (Id, Name, Volume, Price) =
Пример #4
0
 private DrinkDetails(
     DrinkId id,
     Name name,
     Description description,
     Uri photoUrl,
     Roubles priceOfSmallestSize
     ) =>
 (Id, Name, Description, PhotoUrl, PriceOfSmallestSize) =
Пример #5
0
 private Order(
     OrderId id,
     OrderNumber orderNumber,
     Roubles totalPrice,
     Status status,
     OrderDraft draft
     ) =>
 (Id, OrderNumber, TotalPrice, Status, Draft) =
Пример #6
0
 private AddIn(
     AddInId id,
     Name name,
     Description description,
     Uri photoUrl,
     Roubles price
     ) =>
 (Id, Name, Description, PhotoUrl, Price) =
Пример #7
0
 private LastOrderDetails(
     OrderId id,
     DateTime created,
     OrderNumber orderNumber,
     Roubles totalPrice,
     Status status,
     Comment comment,
     List <LastOrderDrink> drinks
     ) =>
 (Id, Created, OrderNumber, TotalPrice, Status, Comment, Drinks) =
Пример #8
0
 public Task <IEnumerable <DrinkDetails> > AvailableDrinkDetails(CancellationToken token = default)
 {
     return(Task.FromResult(AvailableDrinks.
                            Select(ad => DrinkDetails.Available(
                                       ad.Id,
                                       ad.Name,
                                       ad.Description,
                                       ad.PhotoUrl,
                                       Roubles.From(140)
                                       ))));
 }
Пример #9
0
 private Order(
     OrderId id,
     DateTime created,
     OrderNumber orderNumber,
     Roubles totalPrice,
     Status status,
     OrderDraft draft,
     UserId clientId,
     Comment comment
     ) =>
 (Id, Created, OrderNumber, TotalPrice, Status, Draft, ClientId, Comment) =
Пример #10
0
 public static LastOrderDrink Available(
     DrinkDetails drink,
     DrinkSizeDetails drinkSize,
     List <AddInDetails> addIns,
     Quantity count,
     Roubles price
     ) => new LastOrderDrink(
     drink,
     drinkSize,
     addIns,
     count,
     price
     );
Пример #11
0
 private LastOrderDrink(
     DrinkDetails drink,
     DrinkSizeDetails drinkSize,
     List <AddInDetails> addIns,
     Quantity count,
     Roubles price
     )
 {
     Drink     = drink;
     DrinkSize = drinkSize;
     AddIns    = addIns;
     Count     = count;
     Price     = price;
 }