Пример #1
0
        private static void ExampleConfiguration()
        {
            PricingService.AddProductPrices(new[]
            {
                new ProductPrice(new Product("Beans"), 0.65m),
                new ProductPrice(new Product("Bread"), 0.80m),
                new ProductPrice(new Product("Milk"), 1.30m),
                new ProductPrice(new Product("Apples"), 1m)
            });

            PricingService.AddOffers(new IOffer[]
            {
                new DiscountOffer(PricingService,
                                  new Product("Apples"),
                                  0.1m),
                new MultibuyOffer(PricingService,
                                  2,
                                  new Product("Apples"),
                                  1,
                                  new Product("Bread"),
                                  0.5m)
            });
        }