public double CalculateAverage(List <double> values, IAverage averagingMethod)
        {
            if (values == null)
            {
                throw new ArgumentNullException(nameof(values));
            }

            return(averagingMethod.Average(values));
        }
 public String Execute()
 {
     return(cmd.Average());
 }
Beispiel #3
0
 public static int AverageFor(List <int> values, IAverage averageAlgorithm)
 {
     return(averageAlgorithm.Average(values));
 }
Beispiel #4
0
 private static double CalculateAverage(this IEnumerable <double> values, IAverage average)
 {
     return(average.Average());
 }