Class PendingLinqExtensions
- Namespace
- Garyon.Extensions
- Assembly
- Garyon.dll
Contains functions proposed to be added to LINQ but were not.
public static class PendingLinqExtensions
- Inheritance
-
PendingLinqExtensions
- Inherited Members
Methods
Sum(IEnumerable<uint?>)
Computes the sum of a sequence of nullable uint values.
public static uint? Sum(this IEnumerable<uint?> source)
Parameters
sourceIEnumerable<uint?>A sequence of nullable uint values to calculate the sum of.
Returns
- uint?
The sum of the values in the sequence.
Exceptions
- ArgumentNullException
sourceis null.- OverflowException
The sum is larger than MaxValue.
Sum(IEnumerable<ulong?>)
Computes the sum of a sequence of nullable ulong values.
public static ulong? Sum(this IEnumerable<ulong?> source)
Parameters
sourceIEnumerable<ulong?>A sequence of nullable ulong values to calculate the sum of.
Returns
- ulong?
The sum of the values in the sequence.
Exceptions
- ArgumentNullException
sourceis null.- OverflowException
The sum is larger than MaxValue.
Sum(IEnumerable<uint>)
Computes the sum of a sequence of uint values.
public static uint Sum(this IEnumerable<uint> source)
Parameters
sourceIEnumerable<uint>A sequence of uint values to calculate the sum of.
Returns
- uint
The sum of the values in the sequence.
Exceptions
- ArgumentNullException
sourceis null.- OverflowException
The sum is larger than MaxValue.
Sum(IEnumerable<ulong>)
Computes the sum of a sequence of ulong values.
public static ulong Sum(this IEnumerable<ulong> source)
Parameters
sourceIEnumerable<ulong>A sequence of ulong values to calculate the sum of.
Returns
- ulong
The sum of the values in the sequence.
Exceptions
- ArgumentNullException
sourceis null.- OverflowException
The sum is larger than MaxValue.
Sum<TSource>(IEnumerable<TSource>, Func<TSource, uint?>)
Computes the sum of the sequence of nullable uint values that are obtained by invoking a transform function on each element of the input sequence.
public static uint? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, uint?> selector)
Parameters
sourceIEnumerable<TSource>A sequence of values that are used to calculate a sum.
selectorFunc<TSource, uint?>A transform function to apply to each element.
Returns
- uint?
The sum of the projected values.
Type Parameters
TSourceThe type of the elements of source.
Exceptions
- ArgumentNullException
sourceorselectoris null.- OverflowException
The sum is larger than MaxValue.
Sum<TSource>(IEnumerable<TSource>, Func<TSource, ulong?>)
Computes the sum of the sequence of nullable ulong values that are obtained by invoking a transform function on each element of the input sequence.
public static ulong? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, ulong?> selector)
Parameters
sourceIEnumerable<TSource>A sequence of values that are used to calculate a sum.
selectorFunc<TSource, ulong?>A transform function to apply to each element.
Returns
- ulong?
The sum of the projected values.
Type Parameters
TSourceThe type of the elements of source.
Exceptions
- ArgumentNullException
sourceorselectoris null.- OverflowException
The sum is larger than MaxValue.
Sum<TSource>(IEnumerable<TSource>, Func<TSource, uint>)
Computes the sum of the sequence of uint values that are obtained by invoking a transform function on each element of the input sequence.
public static uint Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, uint> selector)
Parameters
sourceIEnumerable<TSource>A sequence of values that are used to calculate a sum.
selectorFunc<TSource, uint>A transform function to apply to each element.
Returns
- uint
The sum of the projected values.
Type Parameters
TSourceThe type of the elements of source.
Exceptions
- ArgumentNullException
sourceorselectoris null.- OverflowException
The sum is larger than MaxValue.
Sum<TSource>(IEnumerable<TSource>, Func<TSource, ulong>)
Computes the sum of the sequence of ulong values that are obtained by invoking a transform function on each element of the input sequence.
public static ulong Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, ulong> selector)
Parameters
sourceIEnumerable<TSource>A sequence of values that are used to calculate a sum.
selectorFunc<TSource, ulong>A transform function to apply to each element.
Returns
- ulong
The sum of the projected values.
Type Parameters
TSourceThe type of the elements of source.
Exceptions
- ArgumentNullException
sourceorselectoris null.- OverflowException
The sum is larger than MaxValue.