예제 #1
0
        public void AverageDouble()
        {
            Aggregate <double, double>("double:empty", Enumerable.Average, EnumerableExt.Average);
            Aggregate <double?, double?>("double?:empty", Enumerable.Average, EnumerableExt.Average);
            Aggregate <double?, double?>("double?:all null", Enumerable.Average, EnumerableExt.Average, null, null, null);
            Aggregate <double?, double?>("double?:starts null", Enumerable.Average, EnumerableExt.Average, null, 1, 2, 3, 1);
            Aggregate <double?, double?>("double?:with null", Enumerable.Average, EnumerableExt.Average, 1, 2, null, 3, 1);
            Aggregate <double, double>("double:without null", Enumerable.Average, EnumerableExt.Average, 1, 2, 3, 1);
            Aggregate <double?, double?>("double?:without null", Enumerable.Average, EnumerableExt.Average, 1, 2, 3, 1);

            Aggregate <double, double>("double [proj]:empty", x => Enumerable.Average(x, y => - y), x => EnumerableExt.Average(x, y => - y));
            Aggregate <double?, double?>("double? [proj]:empty", x => Enumerable.Average(x, y => - y), x => EnumerableExt.Average(x, y => - y));
            Aggregate <double?, double?>("double? [proj]:all null", x => Enumerable.Average(x, y => - y), x => EnumerableExt.Average(x, y => - y), null, null, null);
            Aggregate <double?, double?>("double? [proj]:starts null", x => Enumerable.Average(x, y => - y), x => EnumerableExt.Average(x, y => - y), null, 1, 2, 3, 1);
            Aggregate <double?, double?>("double? [proj]:with null", x => Enumerable.Average(x, y => - y), x => EnumerableExt.Average(x, y => - y), 1, 2, null, 3, 1);
            Aggregate <double, double>("double [proj]:without null", x => Enumerable.Average(x, y => - y), x => EnumerableExt.Average(x, y => - y), 1, 2, 3, 1);
            Aggregate <double?, double?>("double? [proj]:without null", x => Enumerable.Average(x, y => - y), x => EnumerableExt.Average(x, y => - y), 1, 2, 3, 1);
        }