|
@@ -159,12 +159,12 @@ namespace System.Linq
|
|
|
base.Dispose();
|
|
base.Dispose();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- protected override async Task<bool> MoveNextCore(CancellationToken cancellationToken)
|
|
|
|
|
|
|
+ protected override async Task<bool> MoveNextCore()
|
|
|
{
|
|
{
|
|
|
switch (state)
|
|
switch (state)
|
|
|
{
|
|
{
|
|
|
case AsyncIteratorState.Allocated:
|
|
case AsyncIteratorState.Allocated:
|
|
|
- lookup = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ lookup = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer).ConfigureAwait(false);
|
|
|
enumerator = lookup.ApplyResultSelector(resultSelector).GetEnumerator();
|
|
enumerator = lookup.ApplyResultSelector(resultSelector).GetEnumerator();
|
|
|
state = AsyncIteratorState.Iterating;
|
|
state = AsyncIteratorState.Iterating;
|
|
|
goto case AsyncIteratorState.Iterating;
|
|
goto case AsyncIteratorState.Iterating;
|
|
@@ -185,13 +185,13 @@ namespace System.Linq
|
|
|
|
|
|
|
|
public async Task<TResult[]> ToArrayAsync(CancellationToken cancellationToken)
|
|
public async Task<TResult[]> ToArrayAsync(CancellationToken cancellationToken)
|
|
|
{
|
|
{
|
|
|
- var l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ var l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer).ConfigureAwait(false);
|
|
|
return l.ToArray(resultSelector);
|
|
return l.ToArray(resultSelector);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public async Task<List<TResult>> ToListAsync(CancellationToken cancellationToken)
|
|
public async Task<List<TResult>> ToListAsync(CancellationToken cancellationToken)
|
|
|
{
|
|
{
|
|
|
- var l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ var l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer).ConfigureAwait(false);
|
|
|
return l.ToList(resultSelector);
|
|
return l.ToList(resultSelector);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -202,7 +202,7 @@ namespace System.Linq
|
|
|
return -1;
|
|
return -1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- var l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ var l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer).ConfigureAwait(false);
|
|
|
|
|
|
|
|
return l.Count;
|
|
return l.Count;
|
|
|
}
|
|
}
|
|
@@ -248,12 +248,12 @@ namespace System.Linq
|
|
|
base.Dispose();
|
|
base.Dispose();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- protected override async Task<bool> MoveNextCore(CancellationToken cancellationToken)
|
|
|
|
|
|
|
+ protected override async Task<bool> MoveNextCore()
|
|
|
{
|
|
{
|
|
|
switch (state)
|
|
switch (state)
|
|
|
{
|
|
{
|
|
|
case AsyncIteratorState.Allocated:
|
|
case AsyncIteratorState.Allocated:
|
|
|
- lookup = await Internal.Lookup<TKey, TElement>.CreateAsync(source, keySelector, elementSelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ lookup = await Internal.Lookup<TKey, TElement>.CreateAsync(source, keySelector, elementSelector, comparer).ConfigureAwait(false);
|
|
|
enumerator = lookup.GetEnumerator();
|
|
enumerator = lookup.GetEnumerator();
|
|
|
state = AsyncIteratorState.Iterating;
|
|
state = AsyncIteratorState.Iterating;
|
|
|
goto case AsyncIteratorState.Iterating;
|
|
goto case AsyncIteratorState.Iterating;
|
|
@@ -274,13 +274,13 @@ namespace System.Linq
|
|
|
|
|
|
|
|
public async Task<IAsyncGrouping<TKey, TElement>[]> ToArrayAsync(CancellationToken cancellationToken)
|
|
public async Task<IAsyncGrouping<TKey, TElement>[]> ToArrayAsync(CancellationToken cancellationToken)
|
|
|
{
|
|
{
|
|
|
- IIListProvider<IAsyncGrouping<TKey, TElement>> l = await Internal.Lookup<TKey, TElement>.CreateAsync(source, keySelector, elementSelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ IIListProvider<IAsyncGrouping<TKey, TElement>> l = await Internal.Lookup<TKey, TElement>.CreateAsync(source, keySelector, elementSelector, comparer).ConfigureAwait(false);
|
|
|
return await l.ToArrayAsync(cancellationToken).ConfigureAwait(false);
|
|
return await l.ToArrayAsync(cancellationToken).ConfigureAwait(false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public async Task<List<IAsyncGrouping<TKey, TElement>>> ToListAsync(CancellationToken cancellationToken)
|
|
public async Task<List<IAsyncGrouping<TKey, TElement>>> ToListAsync(CancellationToken cancellationToken)
|
|
|
{
|
|
{
|
|
|
- IIListProvider<IAsyncGrouping<TKey, TElement>> l = await Internal.Lookup<TKey, TElement>.CreateAsync(source, keySelector, elementSelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ IIListProvider<IAsyncGrouping<TKey, TElement>> l = await Internal.Lookup<TKey, TElement>.CreateAsync(source, keySelector, elementSelector, comparer).ConfigureAwait(false);
|
|
|
return await l.ToListAsync(cancellationToken).ConfigureAwait(false);
|
|
return await l.ToListAsync(cancellationToken).ConfigureAwait(false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -291,7 +291,7 @@ namespace System.Linq
|
|
|
return -1;
|
|
return -1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- var l = await Internal.Lookup<TKey, TElement>.CreateAsync(source, keySelector, elementSelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ var l = await Internal.Lookup<TKey, TElement>.CreateAsync(source, keySelector, elementSelector, comparer).ConfigureAwait(false);
|
|
|
|
|
|
|
|
return l.Count;
|
|
return l.Count;
|
|
|
}
|
|
}
|
|
@@ -333,12 +333,12 @@ namespace System.Linq
|
|
|
base.Dispose();
|
|
base.Dispose();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- protected override async Task<bool> MoveNextCore(CancellationToken cancellationToken)
|
|
|
|
|
|
|
+ protected override async Task<bool> MoveNextCore()
|
|
|
{
|
|
{
|
|
|
switch (state)
|
|
switch (state)
|
|
|
{
|
|
{
|
|
|
case AsyncIteratorState.Allocated:
|
|
case AsyncIteratorState.Allocated:
|
|
|
- lookup = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ lookup = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer).ConfigureAwait(false);
|
|
|
enumerator = lookup.GetEnumerator();
|
|
enumerator = lookup.GetEnumerator();
|
|
|
state = AsyncIteratorState.Iterating;
|
|
state = AsyncIteratorState.Iterating;
|
|
|
goto case AsyncIteratorState.Iterating;
|
|
goto case AsyncIteratorState.Iterating;
|
|
@@ -359,13 +359,13 @@ namespace System.Linq
|
|
|
|
|
|
|
|
public async Task<IAsyncGrouping<TKey, TSource>[]> ToArrayAsync(CancellationToken cancellationToken)
|
|
public async Task<IAsyncGrouping<TKey, TSource>[]> ToArrayAsync(CancellationToken cancellationToken)
|
|
|
{
|
|
{
|
|
|
- IIListProvider<IAsyncGrouping<TKey, TSource>> l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ IIListProvider<IAsyncGrouping<TKey, TSource>> l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer).ConfigureAwait(false);
|
|
|
return await l.ToArrayAsync(cancellationToken).ConfigureAwait(false);
|
|
return await l.ToArrayAsync(cancellationToken).ConfigureAwait(false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public async Task<List<IAsyncGrouping<TKey, TSource>>> ToListAsync(CancellationToken cancellationToken)
|
|
public async Task<List<IAsyncGrouping<TKey, TSource>>> ToListAsync(CancellationToken cancellationToken)
|
|
|
{
|
|
{
|
|
|
- IIListProvider<IAsyncGrouping<TKey, TSource>> l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ IIListProvider<IAsyncGrouping<TKey, TSource>> l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer).ConfigureAwait(false);
|
|
|
return await l.ToListAsync(cancellationToken).ConfigureAwait(false);
|
|
return await l.ToListAsync(cancellationToken).ConfigureAwait(false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -376,7 +376,7 @@ namespace System.Linq
|
|
|
return -1;
|
|
return -1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- var l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
+ var l = await Internal.Lookup<TKey, TSource>.CreateAsync(source, keySelector, comparer).ConfigureAwait(false);
|
|
|
|
|
|
|
|
return l.Count;
|
|
return l.Count;
|
|
|
}
|
|
}
|