A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/api/system.linq.parallelenumerable.aggregate below:

ParallelEnumerable.Aggregate Method (System.Linq) | Microsoft Learn

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Applies in parallel an accumulator function over a sequence. This overload is not available in the sequential implementation.

public:
generic <typename TSource, typename TAccumulate, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static TResult Aggregate(System::Linq::ParallelQuery<TSource> ^ source, Func<TAccumulate> ^ seedFactory, Func<TAccumulate, TSource, TAccumulate> ^ updateAccumulatorFunc, Func<TAccumulate, TAccumulate, TAccumulate> ^ combineAccumulatorsFunc, Func<TAccumulate, TResult> ^ resultSelector);
public static TResult Aggregate<TSource,TAccumulate,TResult>(this System.Linq.ParallelQuery<TSource> source, Func<TAccumulate> seedFactory, Func<TAccumulate,TSource,TAccumulate> updateAccumulatorFunc, Func<TAccumulate,TAccumulate,TAccumulate> combineAccumulatorsFunc, Func<TAccumulate,TResult> resultSelector);
static member Aggregate : System.Linq.ParallelQuery<'Source> * Func<'Accumulate> * Func<'Accumulate, 'Source, 'Accumulate> * Func<'Accumulate, 'Accumulate, 'Accumulate> * Func<'Accumulate, 'Result> -> 'Result
<Extension()>
Public Function Aggregate(Of TSource, TAccumulate, TResult) (source As ParallelQuery(Of TSource), seedFactory As Func(Of TAccumulate), updateAccumulatorFunc As Func(Of TAccumulate, TSource, TAccumulate), combineAccumulatorsFunc As Func(Of TAccumulate, TAccumulate, TAccumulate), resultSelector As Func(Of TAccumulate, TResult)) As TResult
Type Parameters
TSource

The type of the elements of source.

TAccumulate

The type of the accumulator value.

TResult

The type of the resulting value.

Parameters
seedFactory
Func<TAccumulate>

A function that returns the initial accumulator value.

updateAccumulatorFunc
Func<TAccumulate,TSource,TAccumulate>

An accumulator function to be invoked on each element in a partition.

combineAccumulatorsFunc
Func<TAccumulate,TAccumulate,TAccumulate>

An accumulator function to be invoked on the yielded accumulator result from each partition.

resultSelector
Func<TAccumulate,TResult>

A function to transform the final accumulator value into the result value.

Returns

TResult

The transformed final accumulator value.

Exceptions

source or seedFactory or updateAccumulatorFunc or combineAccumulatorsFunc or resultSelector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

source contains no elements.

Remarks

This overload is specific to parallelized queries. A parallelized query may partition the data source sequence into several sub-sequences (partitions). The updateAccumulatorFunc is invoked on each element within partitions. Each partition then yields a single accumulated result. The combineAccumulatorsFunc is then invoked on the results of each partition to yield a single element. This element is then transformed by the resultSelector function.

See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4