AggregateExtensionAggregateT, TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TAccumulate8, TResult(IEnumerableT, TAccumulate1, FuncTAccumulate1, T, TAccumulate1, TAccumulate2, FuncTAccumulate2, T, TAccumulate2, TAccumulate3, FuncTAccumulate3, T, TAccumulate3, TAccumulate4, FuncTAccumulate4, T, TAccumulate4, TAccumulate5, FuncTAccumulate5, T, TAccumulate5, TAccumulate6, FuncTAccumulate6, T, TAccumulate6, TAccumulate7, FuncTAccumulate7, T, TAccumulate7, TAccumulate8, FuncTAccumulate8, T, TAccumulate8, FuncTAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TAccumulate8, TResult) Method
Applies eight accumulators sequentially in a single pass over a
sequence.
Namespace: MoreLinq.ExtensionsAssembly: MoreLinq (in MoreLinq.dll) Version: 3.4.0+b99a6a8cc504caf2d48372fe54a2f8116c59cd0c
public static TResult Aggregate<T, TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TAccumulate8, TResult>(
this IEnumerable<T> source,
TAccumulate1 seed1,
Func<TAccumulate1, T, TAccumulate1> accumulator1,
TAccumulate2 seed2,
Func<TAccumulate2, T, TAccumulate2> accumulator2,
TAccumulate3 seed3,
Func<TAccumulate3, T, TAccumulate3> accumulator3,
TAccumulate4 seed4,
Func<TAccumulate4, T, TAccumulate4> accumulator4,
TAccumulate5 seed5,
Func<TAccumulate5, T, TAccumulate5> accumulator5,
TAccumulate6 seed6,
Func<TAccumulate6, T, TAccumulate6> accumulator6,
TAccumulate7 seed7,
Func<TAccumulate7, T, TAccumulate7> accumulator7,
TAccumulate8 seed8,
Func<TAccumulate8, T, TAccumulate8> accumulator8,
Func<TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TAccumulate8, TResult> resultSelector
)
<ExtensionAttribute>
Public Shared Function Aggregate(Of T, TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TAccumulate8, TResult) (
source As IEnumerable(Of T),
seed1 As TAccumulate1,
accumulator1 As Func(Of TAccumulate1, T, TAccumulate1),
seed2 As TAccumulate2,
accumulator2 As Func(Of TAccumulate2, T, TAccumulate2),
seed3 As TAccumulate3,
accumulator3 As Func(Of TAccumulate3, T, TAccumulate3),
seed4 As TAccumulate4,
accumulator4 As Func(Of TAccumulate4, T, TAccumulate4),
seed5 As TAccumulate5,
accumulator5 As Func(Of TAccumulate5, T, TAccumulate5),
seed6 As TAccumulate6,
accumulator6 As Func(Of TAccumulate6, T, TAccumulate6),
seed7 As TAccumulate7,
accumulator7 As Func(Of TAccumulate7, T, TAccumulate7),
seed8 As TAccumulate8,
accumulator8 As Func(Of TAccumulate8, T, TAccumulate8),
resultSelector As Func(Of TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TAccumulate8, TResult)
) As TResult
public:
[ExtensionAttribute]
generic<typename T, typename TAccumulate1, typename TAccumulate2, typename TAccumulate3, typename TAccumulate4, typename TAccumulate5, typename TAccumulate6, typename TAccumulate7, typename TAccumulate8, typename TResult>
static TResult Aggregate(
IEnumerable<T>^ source,
TAccumulate1 seed1,
Func<TAccumulate1, T, TAccumulate1>^ accumulator1,
TAccumulate2 seed2,
Func<TAccumulate2, T, TAccumulate2>^ accumulator2,
TAccumulate3 seed3,
Func<TAccumulate3, T, TAccumulate3>^ accumulator3,
TAccumulate4 seed4,
Func<TAccumulate4, T, TAccumulate4>^ accumulator4,
TAccumulate5 seed5,
Func<TAccumulate5, T, TAccumulate5>^ accumulator5,
TAccumulate6 seed6,
Func<TAccumulate6, T, TAccumulate6>^ accumulator6,
TAccumulate7 seed7,
Func<TAccumulate7, T, TAccumulate7>^ accumulator7,
TAccumulate8 seed8,
Func<TAccumulate8, T, TAccumulate8>^ accumulator8,
Func<TAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TAccumulate8, TResult>^ resultSelector
)
[<ExtensionAttribute>]
static member Aggregate :
source : IEnumerable<'T> *
seed1 : 'TAccumulate1 *
accumulator1 : Func<'TAccumulate1, 'T, 'TAccumulate1> *
seed2 : 'TAccumulate2 *
accumulator2 : Func<'TAccumulate2, 'T, 'TAccumulate2> *
seed3 : 'TAccumulate3 *
accumulator3 : Func<'TAccumulate3, 'T, 'TAccumulate3> *
seed4 : 'TAccumulate4 *
accumulator4 : Func<'TAccumulate4, 'T, 'TAccumulate4> *
seed5 : 'TAccumulate5 *
accumulator5 : Func<'TAccumulate5, 'T, 'TAccumulate5> *
seed6 : 'TAccumulate6 *
accumulator6 : Func<'TAccumulate6, 'T, 'TAccumulate6> *
seed7 : 'TAccumulate7 *
accumulator7 : Func<'TAccumulate7, 'T, 'TAccumulate7> *
seed8 : 'TAccumulate8 *
accumulator8 : Func<'TAccumulate8, 'T, 'TAccumulate8> *
resultSelector : Func<'TAccumulate1, 'TAccumulate2, 'TAccumulate3, 'TAccumulate4, 'TAccumulate5, 'TAccumulate6, 'TAccumulate7, 'TAccumulate8, 'TResult> -> 'TResult
- source IEnumerableT
- The source sequence
- seed1 TAccumulate1
- The seed value for the first accumulator.
- accumulator1 FuncTAccumulate1, T, TAccumulate1
- The first accumulator.
- seed2 TAccumulate2
- The seed value for the second accumulator.
- accumulator2 FuncTAccumulate2, T, TAccumulate2
- The second accumulator.
- seed3 TAccumulate3
- The seed value for the third accumulator.
- accumulator3 FuncTAccumulate3, T, TAccumulate3
- The third accumulator.
- seed4 TAccumulate4
- The seed value for the fourth accumulator.
- accumulator4 FuncTAccumulate4, T, TAccumulate4
- The fourth accumulator.
- seed5 TAccumulate5
- The seed value for the fifth accumulator.
- accumulator5 FuncTAccumulate5, T, TAccumulate5
- The fifth accumulator.
- seed6 TAccumulate6
- The seed value for the sixth accumulator.
- accumulator6 FuncTAccumulate6, T, TAccumulate6
- The sixth accumulator.
- seed7 TAccumulate7
- The seed value for the seventh accumulator.
- accumulator7 FuncTAccumulate7, T, TAccumulate7
- The seventh accumulator.
- seed8 TAccumulate8
- The seed value for the eighth accumulator.
- accumulator8 FuncTAccumulate8, T, TAccumulate8
- The eighth accumulator.
- resultSelector FuncTAccumulate1, TAccumulate2, TAccumulate3, TAccumulate4, TAccumulate5, TAccumulate6, TAccumulate7, TAccumulate8, TResult
-
A function that projects a single result given the result of each
accumulator.
- T
- The type of elements in source.
- TAccumulate1
- The type of first accumulator value.
- TAccumulate2
- The type of second accumulator value.
- TAccumulate3
- The type of third accumulator value.
- TAccumulate4
- The type of fourth accumulator value.
- TAccumulate5
- The type of fifth accumulator value.
- TAccumulate6
- The type of sixth accumulator value.
- TAccumulate7
- The type of seventh accumulator value.
- TAccumulate8
- The type of eighth accumulator value.
- TResult
- The type of the accumulated result.
TResultThe value returned by
resultSelector.In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This operator executes immediately.