|
@@ -15,7 +15,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Max, CancellationToken.None);
|
|
|
+ return source.Aggregate(new Func<int, int, int>(Math.Max), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<int> Max(this IAsyncEnumerable<int> source, CancellationToken cancellationToken)
|
|
@@ -23,7 +23,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Max, cancellationToken);
|
|
|
+ return source.Aggregate(new Func<int, int, int>(Math.Max), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<int> Max<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int> selector)
|
|
@@ -71,7 +71,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Max, CancellationToken.None);
|
|
|
+ return source.Aggregate(new Func<long, long, long>(Math.Max), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<long> Max(this IAsyncEnumerable<long> source, CancellationToken cancellationToken)
|
|
@@ -79,7 +79,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Max, cancellationToken);
|
|
|
+ return source.Aggregate(new Func<long, long, long>(Math.Max), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<long> Max<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, long> selector)
|
|
@@ -127,7 +127,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Max, CancellationToken.None);
|
|
|
+ return source.Aggregate(new Func<float, float, float>(Math.Max), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<float> Max(this IAsyncEnumerable<float> source, CancellationToken cancellationToken)
|
|
@@ -135,7 +135,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Max, cancellationToken);
|
|
|
+ return source.Aggregate(new Func<float, float, float>(Math.Max), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<float> Max<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, float> selector)
|
|
@@ -183,7 +183,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Max, CancellationToken.None);
|
|
|
+ return source.Aggregate(new Func<double, double, double>(Math.Max), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<double> Max(this IAsyncEnumerable<double> source, CancellationToken cancellationToken)
|
|
@@ -191,7 +191,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Max, cancellationToken);
|
|
|
+ return source.Aggregate(new Func<double, double, double>(Math.Max), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<double> Max<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, double> selector)
|
|
@@ -239,7 +239,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Max, CancellationToken.None);
|
|
|
+ return source.Aggregate(new Func<decimal, decimal, decimal>(Math.Max), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<decimal> Max(this IAsyncEnumerable<decimal> source, CancellationToken cancellationToken)
|
|
@@ -247,7 +247,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Max, cancellationToken);
|
|
|
+ return source.Aggregate(new Func<decimal, decimal, decimal>(Math.Max), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<decimal> Max<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, decimal> selector)
|
|
@@ -295,7 +295,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(int?), NullableMax, CancellationToken.None);
|
|
|
+ return source.Aggregate(default(int?), new Func<int?, int?, int?>(NullableMax), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<int?> Max(this IAsyncEnumerable<int?> source, CancellationToken cancellationToken)
|
|
@@ -303,7 +303,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(int?), NullableMax, cancellationToken);
|
|
|
+ return source.Aggregate(default(int?), new Func<int?, int?, int?>(NullableMax), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<int?> Max<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int?> selector)
|
|
@@ -351,7 +351,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(long?), NullableMax, CancellationToken.None);
|
|
|
+ return source.Aggregate(default(long?), new Func<long?, long?, long?>(NullableMax), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<long?> Max(this IAsyncEnumerable<long?> source, CancellationToken cancellationToken)
|
|
@@ -359,7 +359,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(long?), NullableMax, cancellationToken);
|
|
|
+ return source.Aggregate(default(long?), new Func<long?, long?, long?>(NullableMax), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<long?> Max<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, long?> selector)
|
|
@@ -407,7 +407,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(float?), NullableMax, CancellationToken.None);
|
|
|
+ return source.Aggregate(default(float?), new Func<float?, float?, float?>(NullableMax), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<float?> Max(this IAsyncEnumerable<float?> source, CancellationToken cancellationToken)
|
|
@@ -415,7 +415,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(float?), NullableMax, cancellationToken);
|
|
|
+ return source.Aggregate(default(float?), new Func<float?, float?, float?>(NullableMax), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<float?> Max<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, float?> selector)
|
|
@@ -463,7 +463,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(double?), NullableMax, CancellationToken.None);
|
|
|
+ return source.Aggregate(default(double?), new Func<double?, double?, double?>(NullableMax), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<double?> Max(this IAsyncEnumerable<double?> source, CancellationToken cancellationToken)
|
|
@@ -471,7 +471,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(double?), NullableMax, cancellationToken);
|
|
|
+ return source.Aggregate(default(double?), new Func<double?, double?, double?>(NullableMax), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<double?> Max<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, double?> selector)
|
|
@@ -519,7 +519,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(decimal?), NullableMax, CancellationToken.None);
|
|
|
+ return source.Aggregate(default(decimal?), new Func<decimal?, decimal?, decimal?>(NullableMax), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<decimal?> Max(this IAsyncEnumerable<decimal?> source, CancellationToken cancellationToken)
|
|
@@ -527,7 +527,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(decimal?), NullableMax, cancellationToken);
|
|
|
+ return source.Aggregate(default(decimal?), new Func<decimal?, decimal?, decimal?>(NullableMax), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<decimal?> Max<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, decimal?> selector)
|
|
@@ -575,7 +575,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Min, CancellationToken.None);
|
|
|
+ return source.Aggregate(new Func<int, int, int>(Math.Min), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<int> Min(this IAsyncEnumerable<int> source, CancellationToken cancellationToken)
|
|
@@ -583,7 +583,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Min, cancellationToken);
|
|
|
+ return source.Aggregate(new Func<int, int, int>(Math.Min), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<int> Min<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int> selector)
|
|
@@ -631,7 +631,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Min, CancellationToken.None);
|
|
|
+ return source.Aggregate(new Func<long, long, long>(Math.Min), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<long> Min(this IAsyncEnumerable<long> source, CancellationToken cancellationToken)
|
|
@@ -639,7 +639,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Min, cancellationToken);
|
|
|
+ return source.Aggregate(new Func<long, long, long>(Math.Min), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<long> Min<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, long> selector)
|
|
@@ -687,7 +687,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Min, CancellationToken.None);
|
|
|
+ return source.Aggregate(new Func<float, float, float>(Math.Min), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<float> Min(this IAsyncEnumerable<float> source, CancellationToken cancellationToken)
|
|
@@ -695,7 +695,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Min, cancellationToken);
|
|
|
+ return source.Aggregate(new Func<float, float, float>(Math.Min), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<float> Min<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, float> selector)
|
|
@@ -743,7 +743,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Min, CancellationToken.None);
|
|
|
+ return source.Aggregate(new Func<double, double, double>(Math.Min), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<double> Min(this IAsyncEnumerable<double> source, CancellationToken cancellationToken)
|
|
@@ -751,7 +751,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Min, cancellationToken);
|
|
|
+ return source.Aggregate(new Func<double, double, double>(Math.Min), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<double> Min<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, double> selector)
|
|
@@ -799,7 +799,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Min, CancellationToken.None);
|
|
|
+ return source.Aggregate(new Func<decimal, decimal, decimal>(Math.Min), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<decimal> Min(this IAsyncEnumerable<decimal> source, CancellationToken cancellationToken)
|
|
@@ -807,7 +807,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(Math.Min, cancellationToken);
|
|
|
+ return source.Aggregate(new Func<decimal, decimal, decimal>(Math.Min), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<decimal> Min<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, decimal> selector)
|
|
@@ -855,7 +855,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(int?), NullableMin, CancellationToken.None);
|
|
|
+ return source.Aggregate(default(int?), new Func<int?, int?, int?>(NullableMin), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<int?> Min(this IAsyncEnumerable<int?> source, CancellationToken cancellationToken)
|
|
@@ -863,7 +863,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(int?), NullableMin, cancellationToken);
|
|
|
+ return source.Aggregate(default(int?), new Func<int?, int?, int?>(NullableMin), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<int?> Min<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int?> selector)
|
|
@@ -911,7 +911,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(long?), NullableMin, CancellationToken.None);
|
|
|
+ return source.Aggregate(default(long?), new Func<long?, long?, long?>(NullableMin), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<long?> Min(this IAsyncEnumerable<long?> source, CancellationToken cancellationToken)
|
|
@@ -919,7 +919,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(long?), NullableMin, cancellationToken);
|
|
|
+ return source.Aggregate(default(long?), new Func<long?, long?, long?>(NullableMin), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<long?> Min<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, long?> selector)
|
|
@@ -967,7 +967,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(float?), NullableMin, CancellationToken.None);
|
|
|
+ return source.Aggregate(default(float?), new Func<float?, float?, float?>(NullableMin), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<float?> Min(this IAsyncEnumerable<float?> source, CancellationToken cancellationToken)
|
|
@@ -975,7 +975,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(float?), NullableMin, cancellationToken);
|
|
|
+ return source.Aggregate(default(float?), new Func<float?, float?, float?>(NullableMin), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<float?> Min<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, float?> selector)
|
|
@@ -1023,7 +1023,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(double?), NullableMin, CancellationToken.None);
|
|
|
+ return source.Aggregate(default(double?), new Func<double?, double?, double?>(NullableMin), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<double?> Min(this IAsyncEnumerable<double?> source, CancellationToken cancellationToken)
|
|
@@ -1031,7 +1031,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(double?), NullableMin, cancellationToken);
|
|
|
+ return source.Aggregate(default(double?), new Func<double?, double?, double?>(NullableMin), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<double?> Min<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, double?> selector)
|
|
@@ -1079,7 +1079,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(decimal?), NullableMin, CancellationToken.None);
|
|
|
+ return source.Aggregate(default(decimal?), new Func<decimal?, decimal?, decimal?>(NullableMin), CancellationToken.None);
|
|
|
}
|
|
|
|
|
|
public static Task<decimal?> Min(this IAsyncEnumerable<decimal?> source, CancellationToken cancellationToken)
|
|
@@ -1087,7 +1087,7 @@ namespace System.Linq
|
|
|
if (source == null)
|
|
|
throw new ArgumentNullException(nameof(source));
|
|
|
|
|
|
- return source.Aggregate(default(decimal?), NullableMin, cancellationToken);
|
|
|
+ return source.Aggregate(default(decimal?), new Func<decimal?, decimal?, decimal?>(NullableMin), cancellationToken);
|
|
|
}
|
|
|
|
|
|
public static Task<decimal?> Min<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, decimal?> selector)
|