|
@@ -13,7 +13,7 @@ namespace System.Linq
|
|
|
public static Task<int> Sum(this IAsyncEnumerable<int> source)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, CancellationToken.None);
|
|
|
}
|
|
@@ -21,7 +21,7 @@ namespace System.Linq
|
|
|
public static Task<int> Sum(this IAsyncEnumerable<int> source, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, cancellationToken);
|
|
|
}
|
|
@@ -29,9 +29,9 @@ namespace System.Linq
|
|
|
public static Task<int> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -39,9 +39,9 @@ namespace System.Linq
|
|
|
public static Task<int> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -49,9 +49,9 @@ namespace System.Linq
|
|
|
public static Task<int> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<int>> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -59,9 +59,9 @@ namespace System.Linq
|
|
|
public static Task<int> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<int>> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -145,7 +145,7 @@ namespace System.Linq
|
|
|
public static Task<long> Sum(this IAsyncEnumerable<long> source)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, CancellationToken.None);
|
|
|
}
|
|
@@ -153,7 +153,7 @@ namespace System.Linq
|
|
|
public static Task<long> Sum(this IAsyncEnumerable<long> source, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, cancellationToken);
|
|
|
}
|
|
@@ -161,9 +161,9 @@ namespace System.Linq
|
|
|
public static Task<long> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, long> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -171,9 +171,9 @@ namespace System.Linq
|
|
|
public static Task<long> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, long> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -181,9 +181,9 @@ namespace System.Linq
|
|
|
public static Task<long> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<long>> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -191,9 +191,9 @@ namespace System.Linq
|
|
|
public static Task<long> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<long>> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -277,7 +277,7 @@ namespace System.Linq
|
|
|
public static Task<float> Sum(this IAsyncEnumerable<float> source)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, CancellationToken.None);
|
|
|
}
|
|
@@ -285,7 +285,7 @@ namespace System.Linq
|
|
|
public static Task<float> Sum(this IAsyncEnumerable<float> source, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, cancellationToken);
|
|
|
}
|
|
@@ -293,9 +293,9 @@ namespace System.Linq
|
|
|
public static Task<float> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, float> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -303,9 +303,9 @@ namespace System.Linq
|
|
|
public static Task<float> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, float> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -313,9 +313,9 @@ namespace System.Linq
|
|
|
public static Task<float> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<float>> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -323,9 +323,9 @@ namespace System.Linq
|
|
|
public static Task<float> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<float>> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -400,7 +400,7 @@ namespace System.Linq
|
|
|
public static Task<double> Sum(this IAsyncEnumerable<double> source)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, CancellationToken.None);
|
|
|
}
|
|
@@ -408,7 +408,7 @@ namespace System.Linq
|
|
|
public static Task<double> Sum(this IAsyncEnumerable<double> source, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, cancellationToken);
|
|
|
}
|
|
@@ -416,9 +416,9 @@ namespace System.Linq
|
|
|
public static Task<double> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, double> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -426,9 +426,9 @@ namespace System.Linq
|
|
|
public static Task<double> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, double> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -436,9 +436,9 @@ namespace System.Linq
|
|
|
public static Task<double> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<double>> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -446,9 +446,9 @@ namespace System.Linq
|
|
|
public static Task<double> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<double>> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -523,7 +523,7 @@ namespace System.Linq
|
|
|
public static Task<decimal> Sum(this IAsyncEnumerable<decimal> source)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, CancellationToken.None);
|
|
|
}
|
|
@@ -531,7 +531,7 @@ namespace System.Linq
|
|
|
public static Task<decimal> Sum(this IAsyncEnumerable<decimal> source, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, cancellationToken);
|
|
|
}
|
|
@@ -539,9 +539,9 @@ namespace System.Linq
|
|
|
public static Task<decimal> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, decimal> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -549,9 +549,9 @@ namespace System.Linq
|
|
|
public static Task<decimal> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, decimal> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -559,9 +559,9 @@ namespace System.Linq
|
|
|
public static Task<decimal> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<decimal>> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -569,9 +569,9 @@ namespace System.Linq
|
|
|
public static Task<decimal> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<decimal>> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -646,7 +646,7 @@ namespace System.Linq
|
|
|
public static Task<int?> Sum(this IAsyncEnumerable<int?> source)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, CancellationToken.None);
|
|
|
}
|
|
@@ -654,7 +654,7 @@ namespace System.Linq
|
|
|
public static Task<int?> Sum(this IAsyncEnumerable<int?> source, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, cancellationToken);
|
|
|
}
|
|
@@ -662,9 +662,9 @@ namespace System.Linq
|
|
|
public static Task<int?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int?> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -672,9 +672,9 @@ namespace System.Linq
|
|
|
public static Task<int?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, int?> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -682,9 +682,9 @@ namespace System.Linq
|
|
|
public static Task<int?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<int?>> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -692,9 +692,9 @@ namespace System.Linq
|
|
|
public static Task<int?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<int?>> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -778,7 +778,7 @@ namespace System.Linq
|
|
|
public static Task<long?> Sum(this IAsyncEnumerable<long?> source)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, CancellationToken.None);
|
|
|
}
|
|
@@ -786,7 +786,7 @@ namespace System.Linq
|
|
|
public static Task<long?> Sum(this IAsyncEnumerable<long?> source, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, cancellationToken);
|
|
|
}
|
|
@@ -794,9 +794,9 @@ namespace System.Linq
|
|
|
public static Task<long?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, long?> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -804,9 +804,9 @@ namespace System.Linq
|
|
|
public static Task<long?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, long?> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -814,9 +814,9 @@ namespace System.Linq
|
|
|
public static Task<long?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<long?>> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -824,9 +824,9 @@ namespace System.Linq
|
|
|
public static Task<long?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<long?>> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -910,7 +910,7 @@ namespace System.Linq
|
|
|
public static Task<float?> Sum(this IAsyncEnumerable<float?> source)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, CancellationToken.None);
|
|
|
}
|
|
@@ -918,7 +918,7 @@ namespace System.Linq
|
|
|
public static Task<float?> Sum(this IAsyncEnumerable<float?> source, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, cancellationToken);
|
|
|
}
|
|
@@ -926,9 +926,9 @@ namespace System.Linq
|
|
|
public static Task<float?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, float?> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -936,9 +936,9 @@ namespace System.Linq
|
|
|
public static Task<float?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, float?> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -946,9 +946,9 @@ namespace System.Linq
|
|
|
public static Task<float?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<float?>> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -956,9 +956,9 @@ namespace System.Linq
|
|
|
public static Task<float?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<float?>> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -1033,7 +1033,7 @@ namespace System.Linq
|
|
|
public static Task<double?> Sum(this IAsyncEnumerable<double?> source)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, CancellationToken.None);
|
|
|
}
|
|
@@ -1041,7 +1041,7 @@ namespace System.Linq
|
|
|
public static Task<double?> Sum(this IAsyncEnumerable<double?> source, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, cancellationToken);
|
|
|
}
|
|
@@ -1049,9 +1049,9 @@ namespace System.Linq
|
|
|
public static Task<double?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, double?> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -1059,9 +1059,9 @@ namespace System.Linq
|
|
|
public static Task<double?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, double?> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -1069,9 +1069,9 @@ namespace System.Linq
|
|
|
public static Task<double?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<double?>> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -1079,9 +1079,9 @@ namespace System.Linq
|
|
|
public static Task<double?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<double?>> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -1156,7 +1156,7 @@ namespace System.Linq
|
|
|
public static Task<decimal?> Sum(this IAsyncEnumerable<decimal?> source)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, CancellationToken.None);
|
|
|
}
|
|
@@ -1164,7 +1164,7 @@ namespace System.Linq
|
|
|
public static Task<decimal?> Sum(this IAsyncEnumerable<decimal?> source, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
|
|
|
return SumCore(source, cancellationToken);
|
|
|
}
|
|
@@ -1172,9 +1172,9 @@ namespace System.Linq
|
|
|
public static Task<decimal?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, decimal?> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -1182,9 +1182,9 @@ namespace System.Linq
|
|
|
public static Task<decimal?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, decimal?> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|
|
@@ -1192,9 +1192,9 @@ namespace System.Linq
|
|
|
public static Task<decimal?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<decimal?>> selector)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, CancellationToken.None);
|
|
|
}
|
|
@@ -1202,9 +1202,9 @@ namespace System.Linq
|
|
|
public static Task<decimal?> Sum<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task<decimal?>> selector, CancellationToken cancellationToken)
|
|
|
{
|
|
|
if (source == null)
|
|
|
- throw new ArgumentNullException(nameof(source));
|
|
|
+ throw Error.ArgumentNull(nameof(source));
|
|
|
if (selector == null)
|
|
|
- throw new ArgumentNullException(nameof(selector));
|
|
|
+ throw Error.ArgumentNull(nameof(selector));
|
|
|
|
|
|
return SumCore(source, selector, cancellationToken);
|
|
|
}
|