AsyncEnumerable.ToLookupAsync Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
ToLookupAsync<TSource,TKey,TElement>(IAsyncEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>, CancellationToken)
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
Tworzy element ILookup<TKey,TElement> na podstawie IAsyncEnumerable<T> określonej funkcji selektora kluczy i funkcji selektora elementów.
public static System.Threading.Tasks.ValueTask<System.Linq.ILookup<TKey,TElement>> ToLookupAsync<TSource,TKey,TElement>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TElement> elementSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default, System.Threading.CancellationToken cancellationToken = default);
static member ToLookupAsync : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, 'Key> * Func<'Source, 'Element> * System.Collections.Generic.IEqualityComparer<'Key> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Linq.ILookup<'Key, 'Element>>
<Extension()>
Public Function ToLookupAsync(Of TSource, TKey, TElement) (source As IAsyncEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), elementSelector As Func(Of TSource, TElement), Optional comparer As IEqualityComparer(Of TKey) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of ILookup(Of TKey, TElement))
Parametry typu
- TSource
Typ elementów elementu source.
- TKey
Typ klucza zwróconego przez keySelector.
- TElement
Typ wartości zwracanej przez elementSelector.
Parametry
- source
- IAsyncEnumerable<TSource>
Element IAsyncEnumerable<T> do utworzenia elementu ILookup<TKey,TElement> na podstawie.
- keySelector
- Func<TSource,TKey>
Funkcja wyodrębniania klucza z każdego elementu.
- elementSelector
- Func<TSource,TElement>
Funkcja transform w celu wygenerowania wartości elementu wyniku z każdego elementu.
- comparer
- IEqualityComparer<TKey>
Element IEqualityComparer<T> do porównywania kluczy.
- cancellationToken
- CancellationToken
Element CancellationToken do monitorowania żądań anulowania. Wartość domyślna to None.
Zwraca
Element ILookup<TKey,TElement> zawierający klucze i wartości.
Wyjątki
Parametr keySelector ma wartość null.
Dotyczy
ToLookupAsync<TSource,TKey,TElement>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<TKey>>, Func<TSource, CancellationToken,ValueTask<TElement>>, IEqualityComparer<TKey>, CancellationToken)
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
Tworzy element ILookup<TKey,TElement> na podstawie IAsyncEnumerable<T> określonej funkcji selektora kluczy i funkcji selektora elementów.
public static System.Threading.Tasks.ValueTask<System.Linq.ILookup<TKey,TElement>> ToLookupAsync<TSource,TKey,TElement>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TKey>> keySelector, Func<TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TElement>> elementSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default, System.Threading.CancellationToken cancellationToken = default);
static member ToLookupAsync : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Element>> * System.Collections.Generic.IEqualityComparer<'Key> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Linq.ILookup<'Key, 'Element>>
<Extension()>
Public Function ToLookupAsync(Of TSource, TKey, TElement) (source As IAsyncEnumerable(Of TSource), keySelector As Func(Of TSource, CancellationToken, ValueTask(Of TKey)), elementSelector As Func(Of TSource, CancellationToken, ValueTask(Of TElement)), Optional comparer As IEqualityComparer(Of TKey) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of ILookup(Of TKey, TElement))
Parametry typu
- TSource
Typ elementów elementu source.
- TKey
Typ klucza zwróconego przez keySelector.
- TElement
Typ wartości zwracanej przez elementSelector.
Parametry
- source
- IAsyncEnumerable<TSource>
Element IAsyncEnumerable<T> do utworzenia elementu ILookup<TKey,TElement> na podstawie.
- keySelector
- Func<TSource,CancellationToken,ValueTask<TKey>>
Funkcja wyodrębniania klucza z każdego elementu.
- elementSelector
- Func<TSource,CancellationToken,ValueTask<TElement>>
Funkcja transform w celu wygenerowania wartości elementu wyniku z każdego elementu.
- comparer
- IEqualityComparer<TKey>
Element IEqualityComparer<T> do porównywania kluczy.
- cancellationToken
- CancellationToken
Element CancellationToken do monitorowania żądań anulowania. Wartość domyślna to None.
Zwraca
Element ILookup<TKey,TElement> zawierający klucze i wartości.
Wyjątki
Parametr keySelector ma wartość null.
Dotyczy
ToLookupAsync<TSource,TKey>(IAsyncEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>, CancellationToken)
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
Tworzy ILookup<TKey,TElement> na podstawie IAsyncEnumerable<T> zgodnie z określoną funkcją selektora kluczy.
public static System.Threading.Tasks.ValueTask<System.Linq.ILookup<TKey,TSource>> ToLookupAsync<TSource,TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default, System.Threading.CancellationToken cancellationToken = default);
static member ToLookupAsync : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, 'Key> * System.Collections.Generic.IEqualityComparer<'Key> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Linq.ILookup<'Key, 'Source>>
<Extension()>
Public Function ToLookupAsync(Of TSource, TKey) (source As IAsyncEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), Optional comparer As IEqualityComparer(Of TKey) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of ILookup(Of TKey, TSource))
Parametry typu
- TSource
Typ elementów elementu source.
- TKey
Typ klucza zwróconego przez keySelector.
Parametry
- source
- IAsyncEnumerable<TSource>
Element IAsyncEnumerable<T> do utworzenia elementu ILookup<TKey,TElement> na podstawie.
- keySelector
- Func<TSource,TKey>
Funkcja wyodrębniania klucza z każdego elementu.
- comparer
- IEqualityComparer<TKey>
Element IEqualityComparer<T> do porównywania kluczy.
- cancellationToken
- CancellationToken
Element CancellationToken do monitorowania żądań anulowania. Wartość domyślna to None.
Zwraca
Element ILookup<TKey,TElement> zawierający klucze i wartości.
Wyjątki
Parametr keySelector ma wartość null.
Dotyczy
ToLookupAsync<TSource,TKey>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<TKey>>, IEqualityComparer<TKey>, CancellationToken)
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
- Źródło:
- ToLookupAsync.cs
Tworzy ILookup<TKey,TElement> na podstawie IAsyncEnumerable<T> zgodnie z określoną funkcją selektora kluczy.
public static System.Threading.Tasks.ValueTask<System.Linq.ILookup<TKey,TSource>> ToLookupAsync<TSource,TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TKey>> keySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default, System.Threading.CancellationToken cancellationToken = default);
static member ToLookupAsync : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * System.Collections.Generic.IEqualityComparer<'Key> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Linq.ILookup<'Key, 'Source>>
<Extension()>
Public Function ToLookupAsync(Of TSource, TKey) (source As IAsyncEnumerable(Of TSource), keySelector As Func(Of TSource, CancellationToken, ValueTask(Of TKey)), Optional comparer As IEqualityComparer(Of TKey) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of ILookup(Of TKey, TSource))
Parametry typu
- TSource
Typ elementów elementu source.
- TKey
Typ klucza zwróconego przez keySelector.
Parametry
- source
- IAsyncEnumerable<TSource>
Element IAsyncEnumerable<T> do utworzenia elementu ILookup<TKey,TElement> na podstawie.
- keySelector
- Func<TSource,CancellationToken,ValueTask<TKey>>
Funkcja wyodrębniania klucza z każdego elementu.
- comparer
- IEqualityComparer<TKey>
Element IEqualityComparer<T> do porównywania kluczy.
- cancellationToken
- CancellationToken
Element CancellationToken do monitorowania żądań anulowania. Wartość domyślna to None.
Zwraca
Element ILookup<TKey,TElement> zawierający klucze i wartości.
Wyjątki
Parametr keySelector ma wartość null.