public double GetBuyPrice(List <ShoppingProduct> shoppingProducts)
        {
            if (null == shoppingProducts || false == shoppingProducts.Any())
            {
                return(0);
            }

            CalculateDiscount calculateDiscount = GroupDiscountSeries(shoppingProducts);

            return(calculateDiscount.GetPrice());
        }
        private CalculateDiscount GroupDiscountSeries(List <ShoppingProduct> shoppingProducts)
        {
            CalculateDiscount collection = new CalculateDiscount();

            foreach (var shoppingProduct in shoppingProducts)
            {
                collection.TryAdd(shoppingProduct);
            }

            return(collection);
        }