System.Linq.Async by .NET Foundation and Contributors

<PackageReference Include="System.Linq.Async" Version="4.0.0" />

.NET API 1,047,504 bytes

 SyncKeySelectorAsyncEnumerableSorter<TElement, TKey>

sealed class SyncKeySelectorAsyncEnumerableSorter<TElement, TKey> : AsyncEnumerableSorterBase<TElement, TKey>
using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace System.Linq { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(new byte[] { 0, 1, 1 })] internal sealed class SyncKeySelectorAsyncEnumerableSorter<[System.Runtime.CompilerServices.Nullable(2)] TElement, [System.Runtime.CompilerServices.Nullable(2)] TKey> : AsyncEnumerableSorterBase<TElement, TKey> { private readonly Func<TElement, TKey> _keySelector; public SyncKeySelectorAsyncEnumerableSorter(Func<TElement, TKey> keySelector, IComparer<TKey> comparer, bool descending, [System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] AsyncEnumerableSorter<TElement> next) : base(comparer, descending, next) { _keySelector = keySelector; } [AsyncStateMachine(typeof(SyncKeySelectorAsyncEnumerableSorter<, >.<ComputeKeys>d__2))] internal override ValueTask ComputeKeys(TElement[] elements, int count) { <ComputeKeys>d__2 stateMachine = default(<ComputeKeys>d__2); stateMachine.<>4__this = this; stateMachine.elements = elements; stateMachine.count = count; stateMachine.<>t__builder = AsyncValueTaskMethodBuilder.Create(); stateMachine.<>1__state = -1; AsyncValueTaskMethodBuilder <>t__builder = stateMachine.<>t__builder; <>t__builder.Start<<ComputeKeys>d__2>(ref stateMachine); return stateMachine.<>t__builder.Task; } } }