Exemple #1
0
        private void AddMealSummary(DietSummary dietSummary, Meal meal)
        {
            var mealSumamry = CreateMealSummary(meal);

            dietSummary.NutritionValues += mealSumamry;

            dietSummary.CaloriesPerMeal.Add(mealSumamry.Calories);
        }
Exemple #2
0
        public DietSummary SummarizeDaily(DailyDiet diet)
        {
            var dietSummary = new DietSummary();

            foreach (var meal in diet.Meals)
            {
                AddMealSummary(dietSummary, meal);
            }

            return(dietSummary);
        }