ExperimentalEnumerableAggregateT, TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult Method (IEnumerableT, FuncIObservableT, IObservableTResult1, FuncIObservableT, IObservableTResult2, FuncIObservableT, IObservableTResult3, FuncIObservableT, IObservableTResult4, FuncIObservableT, IObservableTResult5, FuncIObservableT, IObservableTResult6, FuncTResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult) |
Applies six accumulator queries sequentially in a single
pass over a sequence.
Namespace:
MoreLinq.Experimental
Assembly:
MoreLinq (in MoreLinq.dll) Version: 3.3.1+b77df70598ab84c28cd43dcf74594024b6d575e1
Syntax public static TResult Aggregate<T, TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult>(
this IEnumerable<T> source,
Func<IObservable<T>, IObservable<TResult1>> accumulator1,
Func<IObservable<T>, IObservable<TResult2>> accumulator2,
Func<IObservable<T>, IObservable<TResult3>> accumulator3,
Func<IObservable<T>, IObservable<TResult4>> accumulator4,
Func<IObservable<T>, IObservable<TResult5>> accumulator5,
Func<IObservable<T>, IObservable<TResult6>> accumulator6,
Func<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult> resultSelector
)
<ExtensionAttribute>
Public Shared Function Aggregate(Of T, TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult) (
source As IEnumerable(Of T),
accumulator1 As Func(Of IObservable(Of T), IObservable(Of TResult1)),
accumulator2 As Func(Of IObservable(Of T), IObservable(Of TResult2)),
accumulator3 As Func(Of IObservable(Of T), IObservable(Of TResult3)),
accumulator4 As Func(Of IObservable(Of T), IObservable(Of TResult4)),
accumulator5 As Func(Of IObservable(Of T), IObservable(Of TResult5)),
accumulator6 As Func(Of IObservable(Of T), IObservable(Of TResult6)),
resultSelector As Func(Of TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult)
) As TResult
public:
[ExtensionAttribute]
generic<typename T, typename TResult1, typename TResult2, typename TResult3, typename TResult4, typename TResult5, typename TResult6, typename TResult>
static TResult Aggregate(
IEnumerable<T>^ source,
Func<IObservable<T>^, IObservable<TResult1>^>^ accumulator1,
Func<IObservable<T>^, IObservable<TResult2>^>^ accumulator2,
Func<IObservable<T>^, IObservable<TResult3>^>^ accumulator3,
Func<IObservable<T>^, IObservable<TResult4>^>^ accumulator4,
Func<IObservable<T>^, IObservable<TResult5>^>^ accumulator5,
Func<IObservable<T>^, IObservable<TResult6>^>^ accumulator6,
Func<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult>^ resultSelector
)
[<ExtensionAttribute>]
static member Aggregate :
source : IEnumerable<'T> *
accumulator1 : Func<IObservable<'T>, IObservable<'TResult1>> *
accumulator2 : Func<IObservable<'T>, IObservable<'TResult2>> *
accumulator3 : Func<IObservable<'T>, IObservable<'TResult3>> *
accumulator4 : Func<IObservable<'T>, IObservable<'TResult4>> *
accumulator5 : Func<IObservable<'T>, IObservable<'TResult5>> *
accumulator6 : Func<IObservable<'T>, IObservable<'TResult6>> *
resultSelector : Func<'TResult1, 'TResult2, 'TResult3, 'TResult4, 'TResult5, 'TResult6, 'TResult> -> 'TResult
Parameters
- source
- Type: System.Collections.GenericIEnumerableT
The source sequence - accumulator1
- Type: SystemFuncIObservableT, IObservableTResult1
The first accumulator. - accumulator2
- Type: SystemFuncIObservableT, IObservableTResult2
The second accumulator. - accumulator3
- Type: SystemFuncIObservableT, IObservableTResult3
The third accumulator. - accumulator4
- Type: SystemFuncIObservableT, IObservableTResult4
The fourth accumulator. - accumulator5
- Type: SystemFuncIObservableT, IObservableTResult5
The fifth accumulator. - accumulator6
- Type: SystemFuncIObservableT, IObservableTResult6
The sixth accumulator. - resultSelector
- Type: SystemFuncTResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult
A function that projects a single result given the result of each
accumulator.
Type Parameters
- T
- The type of elements in source.
- TResult1
- The type of the result of the first accumulator.
- TResult2
- The type of the result of the second accumulator.
- TResult3
- The type of the result of the third accumulator.
- TResult4
- The type of the result of the fourth accumulator.
- TResult5
- The type of the result of the fifth accumulator.
- TResult6
- The type of the result of the sixth accumulator.
- TResult
- The type of the accumulated result.
Return Value
Type:
TResultThe value returned by
resultSelector.
Usage Note
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).
Exceptions Exception | Condition |
---|
InvalidOperationException |
An IObservableT returned by an accumulator function
produced zero or more than a single aggregate result.
|
Remarks This operator executes immediately.
Each accumulator argument is a function that receives an
IObservableT, which when subscribed to, produces the
items in the source sequence and in original
order; the function must then return an IObservableT
that produces a single aggregate on completion (when
OnCompleted is called. An error is raised
at run-time if the IObserverT returned by an
accumulator function produces no result or produces more than a
single result.
See Also