ImmutableArrayExtensions.Aggregate Metoda

Definicja

Przeciążenia

Aggregate<T>(ImmutableArray<T>, Func<T,T,T>)

Stosuje funkcję do sekwencji elementów w sposób skumulowany.

Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>)

Stosuje funkcję do sekwencji elementów w sposób skumulowany.

Aggregate<TAccumulate,TResult,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>, Func<TAccumulate,TResult>)

Stosuje funkcję do sekwencji elementów w sposób skumulowany.

Aggregate<T>(ImmutableArray<T>, Func<T,T,T>)

Stosuje funkcję do sekwencji elementów w sposób skumulowany.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T Aggregate(System::Collections::Immutable::ImmutableArray<T> immutableArray, Func<T, T, T> ^ func);
public static T Aggregate<T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,T,T> func);
public static T? Aggregate<T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,T,T> func);
static member Aggregate : System.Collections.Immutable.ImmutableArray<'T> * Func<'T, 'T, 'T> -> 'T
<Extension()>
Public Function Aggregate(Of T) (immutableArray As ImmutableArray(Of T), func As Func(Of T, T, T)) As T

Parametry typu

T

Typ elementu zawartego w kolekcji.

Parametry

immutableArray
ImmutableArray<T>

Kolekcja, do których ma być zastosowana funkcja.

func
Func<T,T,T>

Funkcja, która ma być wywoływana dla każdego elementu, w sposób skumulowany.

Zwraca

T

Końcowa wartość po zastosowaniu funkcji skumulowanej do wszystkich elementów.

Uwagi

Aggregate metoda ułatwia wykonywanie obliczeń w sekwencji wartości. Ta metoda działa przez wywołanie func raz dla każdego elementu w źródle. Za każdym razem func jest wywoływany element przekazuje Aggregate zarówno element z sekwencji, jak i zagregowaną wartość (jako pierwszy argument do func). Wartość parametru seed jest używana jako początkowa wartość agregacji. Wynik func zamienia poprzednią zagregowaną wartość. Aggregate Zwraca wynik końcowy funkcji func.

Dotyczy

Aggregate<TAccumulate,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>)

Stosuje funkcję do sekwencji elementów w sposób skumulowany.

public:
generic <typename TAccumulate, typename T>
[System::Runtime::CompilerServices::Extension]
 static TAccumulate Aggregate(System::Collections::Immutable::ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate, T, TAccumulate> ^ func);
public static TAccumulate Aggregate<TAccumulate,T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate,T,TAccumulate> func);
static member Aggregate : System.Collections.Immutable.ImmutableArray<'T> * 'Accumulate * Func<'Accumulate, 'T, 'Accumulate> -> 'Accumulate
<Extension()>
Public Function Aggregate(Of TAccumulate, T) (immutableArray As ImmutableArray(Of T), seed As TAccumulate, func As Func(Of TAccumulate, T, TAccumulate)) As TAccumulate

Parametry typu

TAccumulate

Typ skumulowanej wartości.

T

Typ elementu zawartego w kolekcji.

Parametry

immutableArray
ImmutableArray<T>

Kolekcja, do których ma być zastosowana funkcja.

seed
TAccumulate

Początkowa wartość akumulatorowa.

func
Func<TAccumulate,T,TAccumulate>

Funkcja, która ma być wywoływana dla każdego elementu, w sposób skumulowany.

Zwraca

TAccumulate

Końcowa wartość akumulatorowa.

Uwagi

Aggregate metoda ułatwia wykonywanie obliczeń w sekwencji wartości. Ta metoda działa przez wywołanie func raz dla każdego elementu w źródle. Za każdym razem func jest wywoływany element przekazuje Aggregate zarówno element z sekwencji, jak i zagregowaną wartość (jako pierwszy argument do func). Wartość parametru seed jest używana jako początkowa wartość agregacji. Wynik func zamienia poprzednią zagregowaną wartość. Aggregate Zwraca wynik końcowy funkcji func.

Dotyczy

Aggregate<TAccumulate,TResult,T>(ImmutableArray<T>, TAccumulate, Func<TAccumulate,T,TAccumulate>, Func<TAccumulate,TResult>)

Stosuje funkcję do sekwencji elementów w sposób skumulowany.

public:
generic <typename TAccumulate, typename TResult, typename T>
[System::Runtime::CompilerServices::Extension]
 static TResult Aggregate(System::Collections::Immutable::ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate, T, TAccumulate> ^ func, Func<TAccumulate, TResult> ^ resultSelector);
public static TResult Aggregate<TAccumulate,TResult,T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate,T,TAccumulate> func, Func<TAccumulate,TResult> resultSelector);
static member Aggregate : System.Collections.Immutable.ImmutableArray<'T> * 'Accumulate * Func<'Accumulate, 'T, 'Accumulate> * Func<'Accumulate, 'Result> -> 'Result
<Extension()>
Public Function Aggregate(Of TAccumulate, TResult, T) (immutableArray As ImmutableArray(Of T), seed As TAccumulate, func As Func(Of TAccumulate, T, TAccumulate), resultSelector As Func(Of TAccumulate, TResult)) As TResult

Parametry typu

TAccumulate

Typ skumulowanej wartości.

TResult

Typ wyniku zwrócony przez selektor wyników.

T

Typ elementu zawartego w kolekcji.

Parametry

immutableArray
ImmutableArray<T>

Kolekcja, do których ma być zastosowana funkcja.

seed
TAccumulate

Początkowa wartość akumulatorowa.

func
Func<TAccumulate,T,TAccumulate>

Funkcja, która ma być wywoływana dla każdego elementu, w sposób skumulowany.

resultSelector
Func<TAccumulate,TResult>

Funkcja przekształcania końcowej wartości akumulatorowej w typ wyniku.

Zwraca

TResult

Końcowa wartość akumulatorowa.

Uwagi

Aggregate metoda ułatwia wykonywanie obliczeń w sekwencji wartości. Ta metoda działa przez wywołanie func raz dla każdego elementu w źródle. Za każdym razem func jest wywoływany element przekazuje Aggregate zarówno element z sekwencji, jak i zagregowaną wartość (jako pierwszy argument do func). Wartość parametru seed jest używana jako początkowa wartość agregacji. Wynik func zamienia poprzednią zagregowaną wartość. Aggregate Zwraca wynik końcowy funkcji func.

Dotyczy