Пример #1
0
        public void AddDisparityTo(
            CriticalRatingWeightCalculation criticalRatingWeightCalculation)
        {
            //todo tell don't ask
            var disparity = _movieBinding.RetrieveMovieBy(_dto.MovieId)
                            .DisparityBasedOn(_dto.Stars);

            criticalRatingWeightCalculation.AddDisparity(disparity);
        }
Пример #2
0
        public void CalculateRatingWeight(CriticalRatingWeightCalculation criticalRatingWeightCalculation)
        {
            var ratingsForMoviesWithAverageRating = RatingsForMoviesWithAverageRating();

            criticalRatingWeightCalculation.UpdateRatingsCountForMoviesWithAverageRating(
                ratingsForMoviesWithAverageRating.Count);
            foreach (var rating in ratingsForMoviesWithAverageRating)
            {
                rating.AddDisparityTo(criticalRatingWeightCalculation);
            }
        }