public RatingResult ComputeResult(IRatingAlgorithm algorithm, 
                                          int numberOfReviewsToUse)
        {
            var filteredReviews = _restaurant.Reviews.Take(numberOfReviewsToUse);

            return algorithm.Compute(filteredReviews.ToList());
        }       
        public RatingResult ComputeResult(IRatingAlgorithm algorithm,
                                          int numberOfReviewsToUse)
        {
            var filteredReviews = _restaurant.Reviews.Take(numberOfReviewsToUse);

            return(algorithm.Compute(filteredReviews.ToList()));
        }
        public RatingResult ComputeRating(IRatingAlgorithm ratingAlgorithm, int numberOfReviews)
        {
            var reviews = _restaurant
                          .Reviews
                          .Take(numberOfReviews)
                          .ToList();

            return(ratingAlgorithm.Compute(reviews));
        }
Beispiel #4
0
 public RateResult ComputeRate( IRatingAlgorithm algorithm, int numerToUse)
 {
     return
         algorithm.Compute(_ratable.Reviews.Take(numerToUse).ToList());
 }
        public int ComputeRating(IRatingAlgorithm ratingAlgorithm, int numberOfReviewsTouse)
        {
            var restaurantToRate = restaurant.Reviews.Take(numberOfReviewsTouse).ToList();

            return(ratingAlgorithm.Compute(restaurantToRate));
        }
 public RatingResult ComputeResult(IRatingAlgorithm algorithm, int numberOfReviews)
 {
     return(algorithm.Compute(_Restaurant.Reviews.Take(numberOfReviews).ToList()));
 }