diff --git a/Ix.NET/Source/System.Linq.Async.Queryable.Tests/AsyncQueryableTests.Generated.cs b/Ix.NET/Source/System.Linq.Async.Queryable.Tests/AsyncQueryableTests.Generated.cs index dfe28b3f75..da980e7326 100644 --- a/Ix.NET/Source/System.Linq.Async.Queryable.Tests/AsyncQueryableTests.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async.Queryable.Tests/AsyncQueryableTests.Generated.cs @@ -27,83 +27,83 @@ public void AggregateAsync1() [Fact] public void AggregateAsync2() { - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "accumulator"); + AssertEx.Throws(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), 1, (int arg0, int arg1) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>), CancellationToken.None), ane => ane.ParamName == "accumulator"); - var res = AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(int), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void AggregateAsync3() { - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "accumulator"); + AssertEx.Throws(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), 1, (int arg0, int arg1) => default(int), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "accumulator"); + AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(int), default(Expression>), CancellationToken.None), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(int), (int arg0) => default(int), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AggregateAsync4() + public void AggregateAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), 1, (int arg0, int arg1) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>), CancellationToken.None), ane => ane.ParamName == "accumulator"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitAsync(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "accumulator"); - var res = AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(int), CancellationToken.None); + var res = AsyncQueryable.AggregateAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AggregateAsync5() + public void AggregateAwaitAsync2() { - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), 1, (int arg0, int arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>>), CancellationToken.None), ane => ane.ParamName == "accumulator"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitAsync(default(IAsyncQueryable), 1, (int arg0, int arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>>), CancellationToken.None), ane => ane.ParamName == "accumulator"); - var res = AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AggregateAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AggregateAsync6() + public void AggregateAwaitAsync3() { - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), 1, (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>>), CancellationToken.None), ane => ane.ParamName == "accumulator"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitAsync(default(IAsyncQueryable), 1, (int arg0, int arg1) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>>), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "accumulator"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AggregateAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AggregateAsync7() + public void AggregateAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), 1, (int arg0, int arg1) => default(int), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "accumulator"); - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(int), default(Expression>), CancellationToken.None), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "accumulator"); - var res = AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(int), (int arg0) => default(int), CancellationToken.None); + var res = AsyncQueryable.AggregateAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AggregateAsync8() + public void AggregateAwaitWithCancellationAsync2() { - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), 1, (int arg0, int arg1) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>>), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "accumulator"); - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitWithCancellationAsync(default(IAsyncQueryable), 1, (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>>), CancellationToken.None), ane => ane.ParamName == "accumulator"); - var res = AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AggregateAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AggregateAsync9() + public void AggregateAwaitWithCancellationAsync3() { - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), 1, (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "accumulator"); - AssertEx.Throws(() => AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitWithCancellationAsync(default(IAsyncQueryable), 1, (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "accumulator"); + AssertEx.Throws(() => AsyncQueryable.AggregateAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.AggregateAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AggregateAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), 1, (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -118,22 +118,22 @@ public void AllAsync1() } [Fact] - public void AllAsync2() + public void AllAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.AllAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AllAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.AllAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AllAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.AllAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AllAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AllAsync3() + public void AllAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.AllAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AllAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.AllAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AllAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.AllAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AllAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -157,22 +157,22 @@ public void AnyAsync2() } [Fact] - public void AnyAsync3() + public void AnyAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.AnyAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AnyAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.AnyAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AnyAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.AnyAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AnyAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AnyAsync4() + public void AnyAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.AnyAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AnyAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.AnyAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AnyAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.AnyAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AnyAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -279,300 +279,300 @@ public void AverageAsync10() [Fact] public void AverageAsync11() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void AverageAsync12() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void AverageAsync13() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(long), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(long), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void AverageAsync14() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(float), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(float), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void AverageAsync15() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(double), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(double), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void AverageAsync16() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(decimal), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), CancellationToken.None); + var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(decimal), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void AverageAsync17() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void AverageAsync18() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void AverageAsync19() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(long), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(long), CancellationToken.None); + var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void AverageAsync20() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync21() + public void AverageAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync22() + public void AverageAwaitAsync2() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(float), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(float), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync23() + public void AverageAwaitAsync3() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync24() + public void AverageAwaitAsync4() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync25() + public void AverageAwaitAsync5() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(double), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(double), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync26() + public void AverageAwaitAsync6() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync27() + public void AverageAwaitAsync7() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync28() + public void AverageAwaitAsync8() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(decimal), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(decimal), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync29() + public void AverageAwaitAsync9() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync30() + public void AverageAwaitAsync10() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync31() + public void AverageAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync32() + public void AverageAwaitWithCancellationAsync2() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync33() + public void AverageAwaitWithCancellationAsync3() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync34() + public void AverageAwaitWithCancellationAsync4() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync35() + public void AverageAwaitWithCancellationAsync5() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync36() + public void AverageAwaitWithCancellationAsync6() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync37() + public void AverageAwaitWithCancellationAsync7() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync38() + public void AverageAwaitWithCancellationAsync8() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync39() + public void AverageAwaitWithCancellationAsync9() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void AverageAsync40() + public void AverageAwaitWithCancellationAsync10() { - AssertEx.Throws(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.AverageAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.AverageAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -635,22 +635,22 @@ public void CountAsync2() } [Fact] - public void CountAsync3() + public void CountAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.CountAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.CountAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.CountAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.CountAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.CountAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.CountAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void CountAsync4() + public void CountAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.CountAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.CountAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.CountAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.CountAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.CountAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.CountAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -754,22 +754,22 @@ public void FirstAsync2() } [Fact] - public void FirstAsync3() + public void FirstAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.FirstAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.FirstAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.FirstAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.FirstAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.FirstAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.FirstAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void FirstAsync4() + public void FirstAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.FirstAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.FirstAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.FirstAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.FirstAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.FirstAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.FirstAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -793,22 +793,22 @@ public void FirstOrDefaultAsync2() } [Fact] - public void FirstOrDefaultAsync3() + public void FirstOrDefaultAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.FirstOrDefaultAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.FirstOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.FirstOrDefaultAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.FirstOrDefaultAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.FirstOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.FirstOrDefaultAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void FirstOrDefaultAsync4() + public void FirstOrDefaultAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.FirstOrDefaultAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.FirstOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.FirstOrDefaultAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.FirstOrDefaultAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.FirstOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.FirstOrDefaultAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -826,10 +826,10 @@ public void GroupBy1() [Fact] public void GroupBy2() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); + var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -837,10 +837,11 @@ public void GroupBy2() [Fact] public void GroupBy3() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>)), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); + var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -848,10 +849,11 @@ public void GroupBy3() [Fact] public void GroupBy4() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0, IAsyncEnumerable arg1) => default(int)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression, int>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), EqualityComparer.Default); + var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -859,10 +861,11 @@ public void GroupBy4() [Fact] public void GroupBy5() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -870,10 +873,11 @@ public void GroupBy5() [Fact] public void GroupBy6() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression, int>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -881,11 +885,12 @@ public void GroupBy6() [Fact] public void GroupBy7() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>)), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), (int arg0, IAsyncEnumerable arg1) => default(int)), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), default(Expression, int>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask)); + var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -893,209 +898,204 @@ public void GroupBy7() [Fact] public void GroupBy8() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int)), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>)), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), default(Expression, int>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int)); + var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy9() + public void GroupByAwait1() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask)), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>)), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask)); + var res = AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy10() + public void GroupByAwait2() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0, IAsyncEnumerable arg1) => default(int)), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression, int>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int)); + var res = AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy11() + public void GroupByAwait3() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression, ValueTask>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>)), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)); + var res = AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy12() + public void GroupByAwait4() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression, ValueTask>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)); + var res = AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy13() + public void GroupByAwait5() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy14() + public void GroupByAwait6() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default); + var res = AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy15() + public void GroupByAwait7() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression, ValueTask>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy16() + public void GroupByAwait8() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression, int>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default); + var res = AsyncQueryable.GroupByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy17() + public void GroupByAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy18() + public void GroupByAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy19() + public void GroupByAwaitWithCancellation3() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int)), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), (int arg0, IAsyncEnumerable arg1) => default(int)), ane => ane.ParamName == "elementSelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), default(Expression, int>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>)), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int)); + var res = AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy20() + public void GroupByAwaitWithCancellation4() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "elementSelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression, ValueTask>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)); + var res = AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy21() + public void GroupByAwaitWithCancellation5() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "elementSelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)); + var res = AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy22() + public void GroupByAwaitWithCancellation6() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), default(Expression, int>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default); + var res = AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy23() + public void GroupByAwaitWithCancellation7() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupBy24() + public void GroupByAwaitWithCancellation8() { - AssertEx.Throws(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); - AssertEx.Throws(() => AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.GroupByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -1117,69 +1117,69 @@ public void GroupJoin1() [Fact] public void GroupJoin2() { - AssertEx.Throws(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "outer"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "inner"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "outerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "innerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression, ValueTask>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "outer"); + AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "inner"); + AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), default(Expression>), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), default(Expression, int>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)); + var res = AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupJoin3() + public void GroupJoinAwait1() { - AssertEx.Throws(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "outer"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "inner"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "outerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "innerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwait(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "outer"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "inner"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "outerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)), ane => ane.ParamName == "innerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression, ValueTask>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)); + var res = AsyncQueryable.GroupJoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupJoin4() + public void GroupJoinAwait2() { - AssertEx.Throws(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "outer"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "inner"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), default(Expression>), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), default(Expression, int>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwait(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outer"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "inner"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, IAsyncEnumerable arg1) => default(int), EqualityComparer.Default); + var res = AsyncQueryable.GroupJoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupJoin5() + public void GroupJoinAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outer"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "inner"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwaitWithCancellation(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "outer"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "inner"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "outerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "innerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, IAsyncEnumerable arg1) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.GroupJoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void GroupJoin6() + public void GroupJoinAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outer"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "inner"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwaitWithCancellation(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outer"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "inner"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.GroupJoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression, CancellationToken, ValueTask>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.GroupJoin(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.GroupJoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, IAsyncEnumerable arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -1223,69 +1223,69 @@ public void Join1() [Fact] public void Join2() { - AssertEx.Throws(() => AsyncQueryable.Join(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "outer"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "inner"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "outerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "innerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.Join(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, int arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "outer"); + AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(int), (int arg0) => default(int), (int arg0, int arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "inner"); + AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>), (int arg0) => default(int), (int arg0, int arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), default(Expression>), (int arg0, int arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), default(Expression>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask)); + var res = AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, int arg1) => default(int), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Join3() + public void JoinAwait1() { - AssertEx.Throws(() => AsyncQueryable.Join(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "outer"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "inner"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "outerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "innerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwait(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "outer"); + AssertEx.Throws(() => AsyncQueryable.JoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "inner"); + AssertEx.Throws(() => AsyncQueryable.JoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "outerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "innerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); + var res = AsyncQueryable.JoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Join4() + public void JoinAwait2() { - AssertEx.Throws(() => AsyncQueryable.Join(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, int arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "outer"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(int), (int arg0) => default(int), (int arg0, int arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "inner"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>), (int arg0) => default(int), (int arg0, int arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), default(Expression>), (int arg0, int arg1) => default(int), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), default(Expression>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwait(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outer"); + AssertEx.Throws(() => AsyncQueryable.JoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "inner"); + AssertEx.Throws(() => AsyncQueryable.JoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, int arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(int), (int arg0) => default(int), (int arg0, int arg1) => default(int), EqualityComparer.Default); + var res = AsyncQueryable.JoinAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Join5() + public void JoinAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.Join(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outer"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "inner"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), default(Expression>>), (int arg0, int arg1) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwaitWithCancellation(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "outer"); + AssertEx.Throws(() => AsyncQueryable.JoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "inner"); + AssertEx.Throws(() => AsyncQueryable.JoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "outerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "innerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), (int arg0, int arg1) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.JoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Join6() + public void JoinAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.Join(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outer"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "inner"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); - AssertEx.Throws(() => AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwaitWithCancellation(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outer"); + AssertEx.Throws(() => AsyncQueryable.JoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "inner"); + AssertEx.Throws(() => AsyncQueryable.JoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "outerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default), ane => ane.ParamName == "innerKeySelector"); + AssertEx.Throws(() => AsyncQueryable.JoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), EqualityComparer.Default), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.Join(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default); + var res = AsyncQueryable.JoinAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask), EqualityComparer.Default); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -1310,22 +1310,22 @@ public void LastAsync2() } [Fact] - public void LastAsync3() + public void LastAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.LastAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.LastAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.LastAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.LastAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.LastAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.LastAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void LastAsync4() + public void LastAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.LastAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.LastAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.LastAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.LastAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.LastAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.LastAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -1349,22 +1349,22 @@ public void LastOrDefaultAsync2() } [Fact] - public void LastOrDefaultAsync3() + public void LastOrDefaultAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.LastOrDefaultAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.LastOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.LastOrDefaultAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.LastOrDefaultAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.LastOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.LastOrDefaultAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void LastOrDefaultAsync4() + public void LastOrDefaultAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.LastOrDefaultAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.LastOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.LastOrDefaultAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.LastOrDefaultAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.LastOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.LastOrDefaultAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -1388,22 +1388,22 @@ public void LongCountAsync2() } [Fact] - public void LongCountAsync3() + public void LongCountAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.LongCountAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.LongCountAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.LongCountAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.LongCountAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.LongCountAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.LongCountAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void LongCountAsync4() + public void LongCountAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.LongCountAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.LongCountAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.LongCountAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.LongCountAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.LongCountAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.LongCountAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -1519,320 +1519,320 @@ public void MaxAsync12() [Fact] public void MaxAsync13() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MaxAsync14() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(long), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(long), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MaxAsync15() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MaxAsync16() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(float), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(float), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MaxAsync17() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MaxAsync18() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(long), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(double), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(long), CancellationToken.None); + var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(double), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MaxAsync19() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MaxAsync20() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(decimal), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(decimal), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MaxAsync21() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MaxAsync22() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync23() + public void MaxAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync24() + public void MaxAwaitAsync2() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(float), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(float), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync25() + public void MaxAwaitAsync3() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync26() + public void MaxAwaitAsync4() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync27() + public void MaxAwaitAsync5() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync28() + public void MaxAwaitAsync6() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync29() + public void MaxAwaitAsync7() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync30() + public void MaxAwaitAsync8() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(double), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(double), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync31() + public void MaxAwaitAsync9() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync32() + public void MaxAwaitAsync10() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync33() + public void MaxAwaitAsync11() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync34() + public void MaxAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync35() + public void MaxAwaitWithCancellationAsync2() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync36() + public void MaxAwaitWithCancellationAsync3() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(decimal), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(decimal), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync37() + public void MaxAwaitWithCancellationAsync4() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync38() + public void MaxAwaitWithCancellationAsync5() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync39() + public void MaxAwaitWithCancellationAsync6() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync40() + public void MaxAwaitWithCancellationAsync7() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync41() + public void MaxAwaitWithCancellationAsync8() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync42() + public void MaxAwaitWithCancellationAsync9() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync43() + public void MaxAwaitWithCancellationAsync10() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MaxAsync44() + public void MaxAwaitWithCancellationAsync11() { - AssertEx.Throws(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MaxAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MaxAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -1938,330 +1938,330 @@ public void MinAsync11() [Fact] public void MinAsync12() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(float), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(float), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MinAsync13() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(float), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(float), CancellationToken.None); + var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MinAsync14() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(double), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(double), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MinAsync15() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MinAsync16() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(decimal), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(decimal), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MinAsync17() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MinAsync18() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MinAsync19() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(double), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(double), CancellationToken.None); + var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MinAsync20() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(long), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(long), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MinAsync21() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void MinAsync22() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync23() + public void MinAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync24() + public void MinAwaitAsync2() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync25() + public void MinAwaitAsync3() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(decimal), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(decimal), CancellationToken.None); + var res = AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync26() + public void MinAwaitAsync4() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync27() + public void MinAwaitAsync5() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync28() + public void MinAwaitAsync6() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync29() + public void MinAwaitAsync7() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync30() + public void MinAwaitAsync8() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync31() + public void MinAwaitAsync9() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), CancellationToken.None); + var res = AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync32() + public void MinAwaitAsync10() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync33() + public void MinAwaitAsync11() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync34() + public void MinAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync35() + public void MinAwaitWithCancellationAsync2() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync36() + public void MinAwaitWithCancellationAsync3() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync37() + public void MinAwaitWithCancellationAsync4() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(long), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(long), CancellationToken.None); + var res = AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync38() + public void MinAwaitWithCancellationAsync5() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync39() + public void MinAwaitWithCancellationAsync6() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync40() + public void MinAwaitWithCancellationAsync7() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync41() + public void MinAwaitWithCancellationAsync8() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync42() + public void MinAwaitWithCancellationAsync9() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync43() + public void MinAwaitWithCancellationAsync10() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), CancellationToken.None); + var res = AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void MinAsync44() + public void MinAwaitWithCancellationAsync11() { - AssertEx.Throws(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.MinAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.MinAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -2287,46 +2287,46 @@ public void OrderBy1() [Fact] public void OrderBy2() { - AssertEx.Throws(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), (int arg0) => default(int), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); + var res = AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), Comparer.Default); } [Fact] - public void OrderBy3() + public void OrderByAwait1() { - AssertEx.Throws(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.OrderByAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.OrderByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); + var res = AsyncQueryable.OrderByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); } [Fact] - public void OrderBy4() + public void OrderByAwait2() { - AssertEx.Throws(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), (int arg0) => default(int), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.OrderByAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.OrderByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), Comparer.Default); + var res = AsyncQueryable.OrderByAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), Comparer.Default); } [Fact] - public void OrderBy5() + public void OrderByAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), (int arg0) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.OrderByAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.OrderByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), Comparer.Default); + var res = AsyncQueryable.OrderByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); } [Fact] - public void OrderBy6() + public void OrderByAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.OrderByAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.OrderByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.OrderBy(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default); + var res = AsyncQueryable.OrderByAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default); } [Fact] @@ -2341,46 +2341,46 @@ public void OrderByDescending1() [Fact] public void OrderByDescending2() { - AssertEx.Throws(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), (int arg0) => default(int), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); + var res = AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), Comparer.Default); } [Fact] - public void OrderByDescending3() + public void OrderByDescendingAwait1() { - AssertEx.Throws(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.OrderByDescendingAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.OrderByDescendingAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); + var res = AsyncQueryable.OrderByDescendingAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); } [Fact] - public void OrderByDescending4() + public void OrderByDescendingAwait2() { - AssertEx.Throws(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), (int arg0) => default(int), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.OrderByDescendingAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.OrderByDescendingAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), Comparer.Default); + var res = AsyncQueryable.OrderByDescendingAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), Comparer.Default); } [Fact] - public void OrderByDescending5() + public void OrderByDescendingAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), (int arg0) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.OrderByDescendingAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.OrderByDescendingAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), Comparer.Default); + var res = AsyncQueryable.OrderByDescendingAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); } [Fact] - public void OrderByDescending6() + public void OrderByDescendingAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.OrderByDescendingAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.OrderByDescendingAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.OrderByDescending(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default); + var res = AsyncQueryable.OrderByDescendingAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default); } [Fact] @@ -2417,54 +2417,54 @@ public void Select1() [Fact] public void Select2() { - AssertEx.Throws(() => AsyncQueryable.Select(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.Select(default(IAsyncQueryable), (int arg0) => default(int)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); + var res = AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Select3() + public void SelectAwait1() { - AssertEx.Throws(() => AsyncQueryable.Select(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SelectAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); + var res = AsyncQueryable.SelectAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Select4() + public void SelectAwait2() { - AssertEx.Throws(() => AsyncQueryable.Select(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SelectAwait(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask)); + var res = AsyncQueryable.SelectAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Select5() + public void SelectAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.Select(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SelectAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); + var res = AsyncQueryable.SelectAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Select6() + public void SelectAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.Select(default(IAsyncQueryable), (int arg0) => default(int)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SelectAwaitWithCancellation(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.Select(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int)); + var res = AsyncQueryable.SelectAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -2483,10 +2483,10 @@ public void SelectMany1() [Fact] public void SelectMany2() { - AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0) => default(ValueTask>)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0, int arg1) => new int[] { default(int) }.ToAsyncEnumerable()), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask>)); + var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => new int[] { default(int) }.ToAsyncEnumerable()); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -2494,10 +2494,11 @@ public void SelectMany2() [Fact] public void SelectMany3() { - AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask>)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0) => new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(int)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, int arg1) => default(int)), ane => ane.ParamName == "collectionSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask>)); + var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(int)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -2505,104 +2506,103 @@ public void SelectMany3() [Fact] public void SelectMany4() { - AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0, int arg1) => new int[] { default(int) }.ToAsyncEnumerable()), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0, int arg1) => new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(int)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, int arg1) => default(int)), ane => ane.ParamName == "collectionSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => new int[] { default(int) }.ToAsyncEnumerable()); + var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(int)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void SelectMany5() + public void SelectManyAwait1() { - AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask>)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask>)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask>)); + var res = AsyncQueryable.SelectManyAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask>)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void SelectMany6() + public void SelectManyAwait2() { - AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask>)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwait(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask>)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask>)); + var res = AsyncQueryable.SelectManyAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask>)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void SelectMany7() + public void SelectManyAwait3() { - AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0) => new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(int)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, int arg1) => default(int)), ane => ane.ParamName == "collectionSelector"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask>), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "collectionSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask>), default(Expression>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(int)); + var res = AsyncQueryable.SelectManyAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask>), (int arg0, int arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void SelectMany8() + public void SelectManyAwait4() { - AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0) => default(ValueTask>), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "collectionSelector"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask>), default(Expression>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwait(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask>), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "collectionSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask>), default(Expression>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask>), (int arg0, int arg1) => default(ValueTask)); + var res = AsyncQueryable.SelectManyAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask>), (int arg0, int arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void SelectMany9() + public void SelectManyAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "collectionSelector"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask>), default(Expression>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask>)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); + var res = AsyncQueryable.SelectManyAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask>)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void SelectMany10() + public void SelectManyAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0, int arg1) => new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(int)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, int arg1) => default(int)), ane => ane.ParamName == "collectionSelector"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwaitWithCancellation(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask>)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(int)); + var res = AsyncQueryable.SelectManyAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask>)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void SelectMany11() + public void SelectManyAwaitWithCancellation3() { - AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask>), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "collectionSelector"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask>), default(Expression>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "collectionSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask>), default(Expression>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask>), (int arg0, int arg1) => default(ValueTask)); + var res = AsyncQueryable.SelectManyAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void SelectMany12() + public void SelectManyAwaitWithCancellation4() { - AssertEx.Throws(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "collectionSelector"); - AssertEx.Throws(() => AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask>), default(Expression>>)), ane => ane.ParamName == "resultSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwaitWithCancellation(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "collectionSelector"); + AssertEx.Throws(() => AsyncQueryable.SelectManyAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask>), default(Expression>>)), ane => ane.ParamName == "resultSelector"); - var res = AsyncQueryable.SelectMany(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); + var res = AsyncQueryable.SelectManyAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask>), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -2647,22 +2647,22 @@ public void SingleAsync2() } [Fact] - public void SingleAsync3() + public void SingleAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.SingleAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SingleAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.SingleAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SingleAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.SingleAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SingleAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SingleAsync4() + public void SingleAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.SingleAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SingleAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.SingleAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SingleAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.SingleAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SingleAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -2686,22 +2686,22 @@ public void SingleOrDefaultAsync2() } [Fact] - public void SingleOrDefaultAsync3() + public void SingleOrDefaultAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.SingleOrDefaultAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SingleOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.SingleOrDefaultAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SingleOrDefaultAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.SingleOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SingleOrDefaultAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SingleOrDefaultAsync4() + public void SingleOrDefaultAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.SingleOrDefaultAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SingleOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.SingleOrDefaultAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SingleOrDefaultAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.SingleOrDefaultAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SingleOrDefaultAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -2748,45 +2748,45 @@ public void SkipWhile2() } [Fact] - public void SkipWhile3() + public void SkipWhileAwait1() { - AssertEx.Throws(() => AsyncQueryable.SkipWhile(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SkipWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.SkipWhileAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SkipWhileAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.SkipWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); + var res = AsyncQueryable.SkipWhileAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void SkipWhile4() + public void SkipWhileAwait2() { - AssertEx.Throws(() => AsyncQueryable.SkipWhile(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SkipWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.SkipWhileAwait(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SkipWhileAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.SkipWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); + var res = AsyncQueryable.SkipWhileAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void SkipWhile5() + public void SkipWhileAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.SkipWhile(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SkipWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.SkipWhileAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SkipWhileAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.SkipWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask)); + var res = AsyncQueryable.SkipWhileAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void SkipWhile6() + public void SkipWhileAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.SkipWhile(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SkipWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.SkipWhileAwaitWithCancellation(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SkipWhileAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.SkipWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); + var res = AsyncQueryable.SkipWhileAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -2884,300 +2884,300 @@ public void SumAsync10() [Fact] public void SumAsync11() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(decimal), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(decimal), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void SumAsync12() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void SumAsync13() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(decimal), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(decimal), CancellationToken.None); + var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void SumAsync14() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void SumAsync15() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void SumAsync16() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void SumAsync17() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void SumAsync18() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(long), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(long), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void SumAsync19() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(float), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(float), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void SumAsync20() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(double), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(double), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync21() + public void SumAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync22() + public void SumAwaitAsync2() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync23() + public void SumAwaitAsync3() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync24() + public void SumAwaitAsync4() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync25() + public void SumAwaitAsync5() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync26() + public void SumAwaitAsync6() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync27() + public void SumAwaitAsync7() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync28() + public void SumAwaitAsync8() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(Nullable), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(Nullable), CancellationToken.None); + var res = AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync29() + public void SumAwaitAsync9() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync30() + public void SumAwaitAsync10() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync31() + public void SumAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), CancellationToken.None); + var res = AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync32() + public void SumAwaitWithCancellationAsync2() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync33() + public void SumAwaitWithCancellationAsync3() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync34() + public void SumAwaitWithCancellationAsync4() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(long), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(long), CancellationToken.None); + var res = AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync35() + public void SumAwaitWithCancellationAsync5() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync36() + public void SumAwaitWithCancellationAsync6() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync37() + public void SumAwaitWithCancellationAsync7() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(float), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(float), CancellationToken.None); + var res = AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync38() + public void SumAwaitWithCancellationAsync8() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync39() + public void SumAwaitWithCancellationAsync9() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void SumAsync40() + public void SumAwaitWithCancellationAsync10() { - AssertEx.Throws(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), (int arg0) => default(double), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), CancellationToken.None), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.SumAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(double), CancellationToken.None); + var res = AsyncQueryable.SumAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -3224,45 +3224,45 @@ public void TakeWhile2() } [Fact] - public void TakeWhile3() + public void TakeWhileAwait1() { - AssertEx.Throws(() => AsyncQueryable.TakeWhile(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.TakeWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.TakeWhileAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.TakeWhileAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.TakeWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); + var res = AsyncQueryable.TakeWhileAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void TakeWhile4() + public void TakeWhileAwait2() { - AssertEx.Throws(() => AsyncQueryable.TakeWhile(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.TakeWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.TakeWhileAwait(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.TakeWhileAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.TakeWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); + var res = AsyncQueryable.TakeWhileAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void TakeWhile5() + public void TakeWhileAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.TakeWhile(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.TakeWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.TakeWhileAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.TakeWhileAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.TakeWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask)); + var res = AsyncQueryable.TakeWhileAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void TakeWhile6() + public void TakeWhileAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.TakeWhile(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.TakeWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.TakeWhileAwaitWithCancellation(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.TakeWhileAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.TakeWhile(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); + var res = AsyncQueryable.TakeWhileAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -3279,46 +3279,46 @@ public void ThenBy1() [Fact] public void ThenBy2() { - AssertEx.Throws(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), (int arg0) => default(int), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(ValueTask)); + var res = AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(int), Comparer.Default); } [Fact] - public void ThenBy3() + public void ThenByAwait1() { - AssertEx.Throws(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ThenByAwait(default(IOrderedAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ThenByAwait(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>)), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0, CancellationToken arg1) => default(ValueTask)); + var res = AsyncQueryable.ThenByAwait(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(ValueTask)); } [Fact] - public void ThenBy4() + public void ThenByAwait2() { - AssertEx.Throws(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), (int arg0) => default(int), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ThenByAwait(default(IOrderedAsyncQueryable), (int arg0) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ThenByAwait(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(int), Comparer.Default); + var res = AsyncQueryable.ThenByAwait(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(ValueTask), Comparer.Default); } [Fact] - public void ThenBy5() + public void ThenByAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), (int arg0) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ThenByAwaitWithCancellation(default(IOrderedAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ThenByAwaitWithCancellation(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>)), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(ValueTask), Comparer.Default); + var res = AsyncQueryable.ThenByAwaitWithCancellation(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0, CancellationToken arg1) => default(ValueTask)); } [Fact] - public void ThenBy6() + public void ThenByAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ThenByAwaitWithCancellation(default(IOrderedAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ThenByAwaitWithCancellation(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ThenBy(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default); + var res = AsyncQueryable.ThenByAwaitWithCancellation(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default); } [Fact] @@ -3333,46 +3333,46 @@ public void ThenByDescending1() [Fact] public void ThenByDescending2() { - AssertEx.Throws(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), (int arg0) => default(int), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(ValueTask)); + var res = AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(int), Comparer.Default); } [Fact] - public void ThenByDescending3() + public void ThenByDescendingAwait1() { - AssertEx.Throws(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>)), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ThenByDescendingAwait(default(IOrderedAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ThenByDescendingAwait(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>)), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0, CancellationToken arg1) => default(ValueTask)); + var res = AsyncQueryable.ThenByDescendingAwait(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(ValueTask)); } [Fact] - public void ThenByDescending4() + public void ThenByDescendingAwait2() { - AssertEx.Throws(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), (int arg0) => default(int), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ThenByDescendingAwait(default(IOrderedAsyncQueryable), (int arg0) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ThenByDescendingAwait(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(int), Comparer.Default); + var res = AsyncQueryable.ThenByDescendingAwait(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(ValueTask), Comparer.Default); } [Fact] - public void ThenByDescending5() + public void ThenByDescendingAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), (int arg0) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ThenByDescendingAwaitWithCancellation(default(IOrderedAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ThenByDescendingAwaitWithCancellation(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>)), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0) => default(ValueTask), Comparer.Default); + var res = AsyncQueryable.ThenByDescendingAwaitWithCancellation(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0, CancellationToken arg1) => default(ValueTask)); } [Fact] - public void ThenByDescending6() + public void ThenByDescendingAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ThenByDescendingAwaitWithCancellation(default(IOrderedAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ThenByDescendingAwaitWithCancellation(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), default(Expression>>), Comparer.Default), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ThenByDescending(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default); + var res = AsyncQueryable.ThenByDescendingAwaitWithCancellation(new int[0].ToAsyncEnumerable().AsAsyncQueryable().OrderBy(x => x), (int arg0, CancellationToken arg1) => default(ValueTask), Comparer.Default); } [Fact] @@ -3397,116 +3397,116 @@ public void ToDictionaryAsync1() [Fact] public void ToDictionaryAsync2() { - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void ToDictionaryAsync3() { - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void ToDictionaryAsync4() { - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToDictionaryAsync5() + public void ToDictionaryAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToDictionaryAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToDictionaryAsync6() + public void ToDictionaryAwaitAsync2() { - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToDictionaryAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToDictionaryAsync7() + public void ToDictionaryAwaitAsync3() { - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), CancellationToken.None); + var res = AsyncQueryable.ToDictionaryAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToDictionaryAsync8() + public void ToDictionaryAwaitAsync4() { - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.ToDictionaryAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToDictionaryAsync9() + public void ToDictionaryAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToDictionaryAsync10() + public void ToDictionaryAwaitWithCancellationAsync2() { - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToDictionaryAsync11() + public void ToDictionaryAwaitWithCancellationAsync3() { - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToDictionaryAsync12() + public void ToDictionaryAwaitWithCancellationAsync4() { - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToDictionaryAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -3550,116 +3550,116 @@ public void ToLookupAsync1() [Fact] public void ToLookupAsync2() { - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void ToLookupAsync3() { - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] public void ToLookupAsync4() { - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToLookupAsync5() + public void ToLookupAwaitAsync1() { - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToLookupAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToLookupAsync6() + public void ToLookupAwaitAsync2() { - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToLookupAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToLookupAsync7() + public void ToLookupAwaitAsync3() { - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), CancellationToken.None); + var res = AsyncQueryable.ToLookupAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToLookupAsync8() + public void ToLookupAwaitAsync4() { - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.ToLookupAwaitAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToLookupAsync9() + public void ToLookupAwaitWithCancellationAsync1() { - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); + var res = AsyncQueryable.ToLookupAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToLookupAsync10() + public void ToLookupAwaitWithCancellationAsync2() { - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), default(Expression>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(int), (int arg0) => default(int), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToLookupAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToLookupAsync11() + public void ToLookupAwaitWithCancellationAsync3() { - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask), (int arg0) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToLookupAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } [Fact] - public void ToLookupAsync12() + public void ToLookupAwaitWithCancellationAsync4() { - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); - AssertEx.Throws(() => AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "keySelector"); + AssertEx.Throws(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), default(Expression>>), EqualityComparer.Default, CancellationToken.None), ane => ane.ParamName == "elementSelector"); - var res = AsyncQueryable.ToLookupAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); + var res = AsyncQueryable.ToLookupAwaitWithCancellationAsync(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask), (int arg0, CancellationToken arg1) => default(ValueTask), EqualityComparer.Default, CancellationToken.None); AssertEx.SucceedOrFailProper(() => res.Wait()); } @@ -3708,45 +3708,45 @@ public void Where2() } [Fact] - public void Where3() + public void WhereAwait1() { - AssertEx.Throws(() => AsyncQueryable.Where(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.Where(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.WhereAwait(default(IAsyncQueryable), (int arg0) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.WhereAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.Where(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); + var res = AsyncQueryable.WhereAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Where4() + public void WhereAwait2() { - AssertEx.Throws(() => AsyncQueryable.Where(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.Where(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.WhereAwait(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.WhereAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.Where(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); + var res = AsyncQueryable.WhereAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Where5() + public void WhereAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.Where(default(IAsyncQueryable), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.Where(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.WhereAwaitWithCancellation(default(IAsyncQueryable), (int arg0, CancellationToken arg1) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.WhereAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.Where(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1) => default(ValueTask)); + var res = AsyncQueryable.WhereAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, CancellationToken arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Where6() + public void WhereAwaitWithCancellation2() { - AssertEx.Throws(() => AsyncQueryable.Where(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); - AssertEx.Throws(() => AsyncQueryable.Where(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); + AssertEx.Throws(() => AsyncQueryable.WhereAwaitWithCancellation(default(IAsyncQueryable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "source"); + AssertEx.Throws(() => AsyncQueryable.WhereAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(Expression>>)), ane => ane.ParamName == "predicate"); - var res = AsyncQueryable.Where(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); + var res = AsyncQueryable.WhereAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } @@ -3764,25 +3764,25 @@ public void Zip1() } [Fact] - public void Zip2() + public void ZipAwait1() { - AssertEx.Throws(() => AsyncQueryable.Zip(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "first"); - AssertEx.Throws(() => AsyncQueryable.Zip(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "second"); - AssertEx.Throws(() => AsyncQueryable.Zip(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.ZipAwait(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "first"); + AssertEx.Throws(() => AsyncQueryable.ZipAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, int arg1) => default(ValueTask)), ane => ane.ParamName == "second"); + AssertEx.Throws(() => AsyncQueryable.ZipAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.Zip(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(ValueTask)); + var res = AsyncQueryable.ZipAwait(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } [Fact] - public void Zip3() + public void ZipAwaitWithCancellation1() { - AssertEx.Throws(() => AsyncQueryable.Zip(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "first"); - AssertEx.Throws(() => AsyncQueryable.Zip(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "second"); - AssertEx.Throws(() => AsyncQueryable.Zip(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>)), ane => ane.ParamName == "selector"); + AssertEx.Throws(() => AsyncQueryable.ZipAwaitWithCancellation(default(IAsyncQueryable), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "first"); + AssertEx.Throws(() => AsyncQueryable.ZipAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), default(IAsyncEnumerable), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)), ane => ane.ParamName == "second"); + AssertEx.Throws(() => AsyncQueryable.ZipAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), default(Expression>>)), ane => ane.ParamName == "selector"); - var res = AsyncQueryable.Zip(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); + var res = AsyncQueryable.ZipAwaitWithCancellation(new int[] { default(int) }.ToAsyncEnumerable().AsAsyncQueryable(), new int[] { default(int) }.ToAsyncEnumerable(), (int arg0, int arg1, CancellationToken arg2) => default(ValueTask)); var task = res.ForEachAsync(_ => { }); AssertEx.SucceedOrFailProper(() => task.Wait()); } diff --git a/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj b/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj index 87a32ad2f9..2684f12139 100644 --- a/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj +++ b/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj @@ -23,4 +23,8 @@ + + + + diff --git a/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.Generated.cs b/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.Generated.cs index 1760dd7ba8..da57fd0ac2 100644 --- a/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.Generated.cs @@ -12,7 +12,7 @@ namespace System.Linq { public static partial class AsyncQueryable { - public static ValueTask AggregateAsync(this IAsyncQueryable source, Expression>> accumulator, CancellationToken cancellationToken = default) + public static ValueTask AggregateAsync(this IAsyncQueryable source, Expression> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -20,13 +20,13 @@ public static ValueTask AggregateAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AggregateAsync(this IAsyncQueryable source, Expression> accumulator, CancellationToken cancellationToken = default) + public static ValueTask AggregateAsync(this IAsyncQueryable source, TAccumulate seed, Expression> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -34,27 +34,29 @@ public static ValueTask AggregateAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AggregateAsync(this IAsyncQueryable source, Expression>> accumulator, CancellationToken cancellationToken = default) + public static ValueTask AggregateAsync(this IAsyncQueryable source, TAccumulate seed, Expression> accumulator, Expression> resultSelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); + if (resultSelector == null) + throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>), default(Expression>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate), typeof(TResult)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AggregateAsync(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitAsync(this IAsyncQueryable source, Expression>> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -62,13 +64,13 @@ public static ValueTask AggregateAsync(this I throw new ArgumentNullException(nameof(accumulator)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AggregateAsync(this IAsyncQueryable source, TAccumulate seed, Expression> accumulator, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitAsync(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -76,59 +78,57 @@ public static ValueTask AggregateAsync(this I throw new ArgumentNullException(nameof(accumulator)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAwaitAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AggregateAsync(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitAsync(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator, Expression>> resultSelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); + if (resultSelector == null) + throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAwaitAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate), typeof(TResult)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AggregateAsync(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator, Expression>> resultSelector, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); - if (resultSelector == null) - throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate), typeof(TResult)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AggregateAsync(this IAsyncQueryable source, TAccumulate seed, Expression> accumulator, Expression> resultSelector, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitWithCancellationAsync(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); - if (resultSelector == null) - throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>), default(Expression>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAwaitWithCancellationAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate), typeof(TResult)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AggregateAsync(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator, Expression>> resultSelector, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitWithCancellationAsync(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator, Expression>> resultSelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -138,7 +138,7 @@ public static ValueTask AggregateAsync(t throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AggregateAwaitWithCancellationAsync(default(IAsyncQueryable), default(TAccumulate), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate), typeof(TResult)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -158,7 +158,7 @@ public static ValueTask AllAsync(this IAsyncQueryable so #endif } - public static ValueTask AllAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask AllAwaitAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -166,13 +166,13 @@ public static ValueTask AllAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AllAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AllAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AllAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask AllAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -180,7 +180,7 @@ public static ValueTask AllAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AllAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AllAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -212,7 +212,7 @@ public static ValueTask AnyAsync(this IAsyncQueryable so #endif } - public static ValueTask AnyAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask AnyAwaitAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -220,13 +220,13 @@ public static ValueTask AnyAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AnyAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AnyAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AnyAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask AnyAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -234,7 +234,7 @@ public static ValueTask AnyAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AnyAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AnyAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -372,7 +372,7 @@ public static ValueTask AverageAsync(this IAsyncQueryable source, #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -380,13 +380,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable source, throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -394,13 +394,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -408,13 +408,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -422,13 +422,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -436,13 +436,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -450,13 +450,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -464,13 +464,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -478,13 +478,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -492,13 +492,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -506,13 +506,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -520,13 +520,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -534,13 +534,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -548,13 +548,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -562,13 +562,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -576,13 +576,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -590,13 +590,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -604,13 +604,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -618,13 +618,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -632,13 +632,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -646,13 +646,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -660,13 +660,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -674,13 +674,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -688,13 +688,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -702,13 +702,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -716,13 +716,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -730,13 +730,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -744,13 +744,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -758,13 +758,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -772,13 +772,13 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask AverageAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -786,7 +786,7 @@ public static ValueTask AverageAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.AverageAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.AverageAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -868,7 +868,7 @@ public static ValueTask CountAsync(this IAsyncQueryable s #endif } - public static ValueTask CountAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask CountAwaitAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -876,13 +876,13 @@ public static ValueTask CountAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.CountAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.CountAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask CountAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask CountAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -890,7 +890,7 @@ public static ValueTask CountAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.CountAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.CountAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -1022,7 +1022,7 @@ public static ValueTask FirstAsync(this IAsyncQueryable FirstAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask FirstAwaitAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1030,13 +1030,13 @@ public static ValueTask FirstAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.FirstAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask FirstAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask FirstAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1044,7 +1044,7 @@ public static ValueTask FirstAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.FirstAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -1076,7 +1076,7 @@ public static ValueTask FirstOrDefaultAsync(this IAsyncQueryab #endif } - public static ValueTask FirstOrDefaultAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask FirstOrDefaultAwaitAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1084,13 +1084,13 @@ public static ValueTask FirstOrDefaultAsync(this IAsyncQueryab throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstOrDefaultAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstOrDefaultAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask FirstOrDefaultAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask FirstOrDefaultAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1098,13 +1098,13 @@ public static ValueTask FirstOrDefaultAsync(this IAsyncQueryab throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstOrDefaultAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstOrDefaultAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression>> keySelector) + public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1112,13 +1112,13 @@ public static IAsyncQueryable> GroupBy>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>))), source.Expression, keySelector)); #else return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression> keySelector) + public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression> keySelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1126,85 +1126,95 @@ public static IAsyncQueryable> GroupBy>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>))), source.Expression, keySelector)); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(IEqualityComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else - return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); + return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression>> keySelector) + public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression, TResult>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); + if (resultSelector == null) + throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression, TResult>>))), source.Expression, keySelector, resultSelector)); #else - return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector)); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer) + public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); + if (elementSelector == null) + throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression>))), source.Expression, keySelector, elementSelector)); #else - return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector)); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression> keySelector, IEqualityComparer comparer) + public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression, TResult>> resultSelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); + if (resultSelector == null) + throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(IEqualityComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression, TResult>>), default(IEqualityComparer))), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else - return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer) + public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); + if (elementSelector == null) + throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else - return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression, CancellationToken, ValueTask>> resultSelector) + public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, Expression, TResult>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); + if (elementSelector == null) + throw new ArgumentNullException(nameof(elementSelector)); if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression, CancellationToken, ValueTask>>))), source.Expression, keySelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression>), default(Expression, TResult>>))), source.Expression, keySelector, elementSelector, resultSelector)); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector)); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector) + public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, Expression, TResult>> resultSelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1212,47 +1222,45 @@ public static IAsyncQueryable> GroupBy>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression>>))), source.Expression, keySelector, elementSelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression>), default(Expression, TResult>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else - return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector)); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression, TResult>> resultSelector) + public static IAsyncQueryable> GroupByAwait(this IAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); - if (resultSelector == null) - throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression, TResult>>))), source.Expression, keySelector, resultSelector)); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector)); + return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector) + public static IAsyncQueryable> GroupByAwait(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); - if (elementSelector == null) - throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression>))), source.Expression, keySelector, elementSelector)); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else - return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector)); + return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression, ValueTask>> resultSelector) + public static IAsyncQueryable GroupByAwait(this IAsyncQueryable source, Expression>> keySelector, Expression, ValueTask>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1262,13 +1270,13 @@ public static IAsyncQueryable GroupBy(this IAsy throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression, ValueTask>>))), source.Expression, keySelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), default(Expression>>), default(Expression, ValueTask>>))), source.Expression, keySelector, resultSelector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector)); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector) + public static IAsyncQueryable> GroupByAwait(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1278,13 +1286,13 @@ public static IAsyncQueryable> GroupBy>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression>>))), source.Expression, keySelector, elementSelector)); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), default(Expression>>), default(Expression>>))), source.Expression, keySelector, elementSelector)); #else return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector)); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression, CancellationToken, ValueTask>> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable GroupByAwait(this IAsyncQueryable source, Expression>> keySelector, Expression, ValueTask>> resultSelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1294,13 +1302,13 @@ public static IAsyncQueryable GroupBy(this IAsy throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression, CancellationToken, ValueTask>>), default(IEqualityComparer))), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), default(Expression>>), default(Expression, ValueTask>>), default(IEqualityComparer))), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer) + public static IAsyncQueryable> GroupByAwait(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1310,29 +1318,31 @@ public static IAsyncQueryable> GroupBy>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression, TResult>> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable GroupByAwait(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, Expression, ValueTask>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); + if (elementSelector == null) + throw new ArgumentNullException(nameof(elementSelector)); if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression, TResult>>), default(IEqualityComparer))), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(Expression, ValueTask>>))), source.Expression, keySelector, elementSelector, resultSelector)); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector)); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, IEqualityComparer comparer) + public static IAsyncQueryable GroupByAwait(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, Expression, ValueTask>> resultSelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1340,65 +1350,61 @@ public static IAsyncQueryable> GroupBy>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwait(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(Expression, ValueTask>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else - return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression, ValueTask>> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable> GroupByAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); - if (resultSelector == null) - throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression, ValueTask>>), default(IEqualityComparer))), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IAsyncQueryable> GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer) + public static IAsyncQueryable> GroupByAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); - if (elementSelector == null) - throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else - return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, Expression, CancellationToken, ValueTask>> resultSelector) + public static IAsyncQueryable GroupByAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector, Expression, CancellationToken, ValueTask>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); - if (elementSelector == null) - throw new ArgumentNullException(nameof(elementSelector)); if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(Expression, CancellationToken, ValueTask>>))), source.Expression, keySelector, elementSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>), default(Expression, CancellationToken, ValueTask>>))), source.Expression, keySelector, resultSelector)); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector)); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, Expression, TResult>> resultSelector) + public static IAsyncQueryable> GroupByAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1406,35 +1412,31 @@ public static IAsyncQueryable GroupBy throw new ArgumentNullException(nameof(keySelector)); if (elementSelector == null) throw new ArgumentNullException(nameof(elementSelector)); - if (resultSelector == null) - throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression>), default(Expression, TResult>>))), source.Expression, keySelector, elementSelector, resultSelector)); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>), default(Expression>>))), source.Expression, keySelector, elementSelector)); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector)); + return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector)); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, Expression, ValueTask>> resultSelector) + public static IAsyncQueryable GroupByAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector, Expression, CancellationToken, ValueTask>> resultSelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); - if (elementSelector == null) - throw new ArgumentNullException(nameof(elementSelector)); if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(Expression, ValueTask>>))), source.Expression, keySelector, elementSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>), default(Expression, CancellationToken, ValueTask>>), default(IEqualityComparer))), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, keySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, Expression, CancellationToken, ValueTask>> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable> GroupByAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1442,17 +1444,15 @@ public static IAsyncQueryable GroupBy throw new ArgumentNullException(nameof(keySelector)); if (elementSelector == null) throw new ArgumentNullException(nameof(elementSelector)); - if (resultSelector == null) - throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(Expression, CancellationToken, ValueTask>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery>(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, Expression, TResult>> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable GroupByAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, Expression, CancellationToken, ValueTask>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1464,13 +1464,13 @@ public static IAsyncQueryable GroupBy throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>), default(Expression>), default(Expression, TResult>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(Expression, CancellationToken, ValueTask>>))), source.Expression, keySelector, elementSelector, resultSelector)); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector)); #endif } - public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, Expression, ValueTask>> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable GroupByAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, Expression, CancellationToken, ValueTask>> resultSelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1482,13 +1482,13 @@ public static IAsyncQueryable GroupBy throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(Expression, ValueTask>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupByAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(Expression, CancellationToken, ValueTask>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, keySelector, elementSelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable GroupJoin(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression, CancellationToken, ValueTask>> resultSelector) + public static IAsyncQueryable GroupJoin(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression, TResult>> resultSelector) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1502,13 +1502,13 @@ public static IAsyncQueryable GroupJoin( throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression, CancellationToken, ValueTask>>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>), default(Expression>), default(Expression, TResult>>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #else return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #endif } - public static IAsyncQueryable GroupJoin(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression, TResult>> resultSelector) + public static IAsyncQueryable GroupJoin(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression, TResult>> resultSelector, IEqualityComparer comparer) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1522,13 +1522,13 @@ public static IAsyncQueryable GroupJoin( throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>), default(Expression>), default(Expression, TResult>>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>), default(Expression>), default(Expression, TResult>>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else - return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); + return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable GroupJoin(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression, ValueTask>> resultSelector) + public static IAsyncQueryable GroupJoinAwait(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression, ValueTask>> resultSelector) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1542,13 +1542,13 @@ public static IAsyncQueryable GroupJoin( throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression, ValueTask>>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoinAwait(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression, ValueTask>>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #else return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #endif } - public static IAsyncQueryable GroupJoin(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression, CancellationToken, ValueTask>> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable GroupJoinAwait(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression, ValueTask>> resultSelector, IEqualityComparer comparer) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1562,13 +1562,13 @@ public static IAsyncQueryable GroupJoin( throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression, CancellationToken, ValueTask>>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoinAwait(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression, ValueTask>>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable GroupJoin(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression, TResult>> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable GroupJoinAwaitWithCancellation(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression, CancellationToken, ValueTask>> resultSelector) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1582,13 +1582,13 @@ public static IAsyncQueryable GroupJoin( throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>), default(Expression>), default(Expression, TResult>>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoinAwaitWithCancellation(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression, CancellationToken, ValueTask>>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #else - return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #endif } - public static IAsyncQueryable GroupJoin(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression, ValueTask>> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable GroupJoinAwaitWithCancellation(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression, CancellationToken, ValueTask>> resultSelector, IEqualityComparer comparer) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1602,7 +1602,7 @@ public static IAsyncQueryable GroupJoin( throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression, ValueTask>>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoinAwaitWithCancellation(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression, CancellationToken, ValueTask>>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif @@ -1636,7 +1636,7 @@ public static IAsyncQueryable Intersect(this IAsyncQueryable Join(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression>> resultSelector) + public static IAsyncQueryable Join(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression> resultSelector) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1650,13 +1650,13 @@ public static IAsyncQueryable Join(this throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Join(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression>>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Join(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>), default(Expression>), default(Expression>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #else return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #endif } - public static IAsyncQueryable Join(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression> resultSelector) + public static IAsyncQueryable Join(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression> resultSelector, IEqualityComparer comparer) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1670,13 +1670,13 @@ public static IAsyncQueryable Join(this throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Join(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>), default(Expression>), default(Expression>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Join(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>), default(Expression>), default(Expression>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else - return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); + return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable Join(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression>> resultSelector) + public static IAsyncQueryable JoinAwait(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression>> resultSelector) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1690,13 +1690,13 @@ public static IAsyncQueryable Join(this throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Join(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression>>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.JoinAwait(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression>>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #else return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #endif } - public static IAsyncQueryable Join(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression>> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable JoinAwait(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression>> resultSelector, IEqualityComparer comparer) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1710,13 +1710,13 @@ public static IAsyncQueryable Join(this throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Join(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression>>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.JoinAwait(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression>>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } - public static IAsyncQueryable Join(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable JoinAwaitWithCancellation(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression>> resultSelector) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1730,13 +1730,13 @@ public static IAsyncQueryable Join(this throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Join(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>), default(Expression>), default(Expression>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.JoinAwaitWithCancellation(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression>>))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #else - return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector)); #endif } - public static IAsyncQueryable Join(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression>> resultSelector, IEqualityComparer comparer) + public static IAsyncQueryable JoinAwaitWithCancellation(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression>> outerKeySelector, Expression>> innerKeySelector, Expression>> resultSelector, IEqualityComparer comparer) { if (outer == null) throw new ArgumentNullException(nameof(outer)); @@ -1750,7 +1750,7 @@ public static IAsyncQueryable Join(this throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Join(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression>>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); + return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.JoinAwaitWithCancellation(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression>>), default(IEqualityComparer))), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else return outer.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), outerKeySelector, innerKeySelector, resultSelector, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif @@ -1782,7 +1782,7 @@ public static ValueTask LastAsync(this IAsyncQueryable LastAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask LastAwaitAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1790,13 +1790,13 @@ public static ValueTask LastAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.LastAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask LastAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask LastAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1804,7 +1804,7 @@ public static ValueTask LastAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.LastAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -1836,7 +1836,7 @@ public static ValueTask LastOrDefaultAsync(this IAsyncQueryabl #endif } - public static ValueTask LastOrDefaultAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask LastOrDefaultAwaitAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1844,13 +1844,13 @@ public static ValueTask LastOrDefaultAsync(this IAsyncQueryabl throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastOrDefaultAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastOrDefaultAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask LastOrDefaultAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask LastOrDefaultAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1858,7 +1858,7 @@ public static ValueTask LastOrDefaultAsync(this IAsyncQueryabl throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastOrDefaultAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastOrDefaultAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -1890,7 +1890,7 @@ public static ValueTask LongCountAsync(this IAsyncQueryable LongCountAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask LongCountAwaitAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1898,13 +1898,13 @@ public static ValueTask LongCountAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.LongCountAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LongCountAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask LongCountAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask LongCountAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -1912,7 +1912,7 @@ public static ValueTask LongCountAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.LongCountAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LongCountAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -2050,7 +2050,7 @@ public static ValueTask MaxAsync(this IAsyncQueryable #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2058,13 +2058,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2072,13 +2072,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2086,13 +2086,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2100,13 +2100,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2114,13 +2114,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2128,13 +2128,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2142,13 +2142,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2156,13 +2156,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2170,13 +2170,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2184,13 +2184,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2198,13 +2198,27 @@ public static ValueTask MaxAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); +#else + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); +#endif + } + + public static ValueTask MaxAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + { + if (source == null) + throw new ArgumentNullException(nameof(source)); + if (selector == null) + throw new ArgumentNullException(nameof(selector)); + +#if CRIPPLED_REFLECTION + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2212,13 +2226,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2226,13 +2240,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2240,13 +2254,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2254,13 +2268,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2268,13 +2282,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2282,13 +2296,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2296,13 +2310,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2310,13 +2324,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2324,13 +2338,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2338,13 +2352,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2352,13 +2366,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2366,13 +2380,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2380,27 +2394,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); -#endif - } - - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) - { - if (source == null) - throw new ArgumentNullException(nameof(source)); - if (selector == null) - throw new ArgumentNullException(nameof(selector)); - -#if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); -#else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2408,13 +2408,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2422,13 +2422,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2436,13 +2436,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2450,13 +2450,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2464,13 +2464,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2478,13 +2478,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2492,13 +2492,13 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MaxAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2506,7 +2506,7 @@ public static ValueTask MaxAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MaxAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -2644,7 +2644,7 @@ public static ValueTask MinAsync(this IAsyncQueryable #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2652,13 +2652,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2666,13 +2666,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2680,13 +2680,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2694,13 +2694,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2708,13 +2708,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2722,13 +2722,13 @@ public static ValueTask MinAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2736,13 +2736,13 @@ public static ValueTask MinAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2750,13 +2750,13 @@ public static ValueTask MinAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2764,13 +2764,13 @@ public static ValueTask MinAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2778,13 +2778,13 @@ public static ValueTask MinAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2792,13 +2792,13 @@ public static ValueTask MinAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2806,13 +2806,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2820,13 +2820,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2834,13 +2834,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2848,13 +2848,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2862,13 +2862,13 @@ public static ValueTask MinAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2876,13 +2876,13 @@ public static ValueTask MinAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2890,13 +2890,13 @@ public static ValueTask MinAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2904,13 +2904,13 @@ public static ValueTask MinAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2918,13 +2918,13 @@ public static ValueTask MinAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2932,13 +2932,13 @@ public static ValueTask MinAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2946,13 +2946,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2960,13 +2960,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2974,13 +2974,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -2988,13 +2988,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3002,13 +3002,13 @@ public static ValueTask MinAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3016,13 +3016,13 @@ public static ValueTask MinAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3030,13 +3030,13 @@ public static ValueTask MinAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3044,13 +3044,13 @@ public static ValueTask MinAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3058,13 +3058,13 @@ public static ValueTask MinAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3072,13 +3072,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3086,13 +3086,13 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask MinAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3100,7 +3100,7 @@ public static ValueTask MinAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.MinAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -3118,7 +3118,7 @@ public static IAsyncQueryable OfType(this IAsyncQueryable OrderBy(this IAsyncQueryable source, Expression>> keySelector) + public static IOrderedAsyncQueryable OrderBy(this IAsyncQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3126,13 +3126,13 @@ public static IOrderedAsyncQueryable OrderBy(this IAsync throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), default(Expression>))), source.Expression, keySelector)); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable OrderBy(this IAsyncQueryable source, Expression> keySelector) + public static IOrderedAsyncQueryable OrderBy(this IAsyncQueryable source, Expression> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3140,13 +3140,13 @@ public static IOrderedAsyncQueryable OrderBy(this IAsync throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), default(Expression>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), default(Expression>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif } - public static IOrderedAsyncQueryable OrderBy(this IAsyncQueryable source, Expression>> keySelector) + public static IOrderedAsyncQueryable OrderByAwait(this IAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3154,13 +3154,13 @@ public static IOrderedAsyncQueryable OrderBy(this IAsync throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByAwait(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable OrderBy(this IAsyncQueryable source, Expression>> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable OrderByAwait(this IAsyncQueryable source, Expression>> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3168,13 +3168,13 @@ public static IOrderedAsyncQueryable OrderBy(this IAsync throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByAwait(default(IAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif } - public static IOrderedAsyncQueryable OrderBy(this IAsyncQueryable source, Expression> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable OrderByAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3182,13 +3182,13 @@ public static IOrderedAsyncQueryable OrderBy(this IAsync throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), default(Expression>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); #else - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable OrderBy(this IAsyncQueryable source, Expression>> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable OrderByAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3196,13 +3196,13 @@ public static IOrderedAsyncQueryable OrderBy(this IAsync throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderBy(default(IAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif } - public static IOrderedAsyncQueryable OrderByDescending(this IAsyncQueryable source, Expression>> keySelector) + public static IOrderedAsyncQueryable OrderByDescending(this IAsyncQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3210,13 +3210,13 @@ public static IOrderedAsyncQueryable OrderByDescending(t throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), default(Expression>))), source.Expression, keySelector)); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable OrderByDescending(this IAsyncQueryable source, Expression> keySelector) + public static IOrderedAsyncQueryable OrderByDescending(this IAsyncQueryable source, Expression> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3224,13 +3224,13 @@ public static IOrderedAsyncQueryable OrderByDescending(t throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), default(Expression>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), default(Expression>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif } - public static IOrderedAsyncQueryable OrderByDescending(this IAsyncQueryable source, Expression>> keySelector) + public static IOrderedAsyncQueryable OrderByDescendingAwait(this IAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3238,13 +3238,13 @@ public static IOrderedAsyncQueryable OrderByDescending(t throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescendingAwait(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable OrderByDescending(this IAsyncQueryable source, Expression>> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable OrderByDescendingAwait(this IAsyncQueryable source, Expression>> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3252,13 +3252,13 @@ public static IOrderedAsyncQueryable OrderByDescending(t throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescendingAwait(default(IAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif } - public static IOrderedAsyncQueryable OrderByDescending(this IAsyncQueryable source, Expression> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable OrderByDescendingAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3266,13 +3266,13 @@ public static IOrderedAsyncQueryable OrderByDescending(t throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), default(Expression>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescendingAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); #else - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable OrderByDescending(this IAsyncQueryable source, Expression>> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable OrderByDescendingAwaitWithCancellation(this IAsyncQueryable source, Expression>> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3280,7 +3280,7 @@ public static IOrderedAsyncQueryable OrderByDescending(t throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescending(default(IAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OrderByDescendingAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif @@ -3310,7 +3310,7 @@ public static IAsyncQueryable Reverse(this IAsyncQueryable Select(this IAsyncQueryable source, Expression>> selector) + public static IAsyncQueryable Select(this IAsyncQueryable source, Expression> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3318,13 +3318,13 @@ public static IAsyncQueryable Select(this IAsyncQuery throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Select(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Select(default(IAsyncQueryable), default(Expression>))), source.Expression, selector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable Select(this IAsyncQueryable source, Expression>> selector) + public static IAsyncQueryable Select(this IAsyncQueryable source, Expression> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3332,13 +3332,13 @@ public static IAsyncQueryable Select(this IAsyncQuery throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Select(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Select(default(IAsyncQueryable), default(Expression>))), source.Expression, selector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable Select(this IAsyncQueryable source, Expression> selector) + public static IAsyncQueryable SelectAwait(this IAsyncQueryable source, Expression>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3346,13 +3346,13 @@ public static IAsyncQueryable Select(this IAsyncQuery throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Select(default(IAsyncQueryable), default(Expression>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectAwait(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable Select(this IAsyncQueryable source, Expression>> selector) + public static IAsyncQueryable SelectAwait(this IAsyncQueryable source, Expression>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3360,13 +3360,13 @@ public static IAsyncQueryable Select(this IAsyncQuery throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Select(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectAwait(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable Select(this IAsyncQueryable source, Expression> selector) + public static IAsyncQueryable SelectAwaitWithCancellation(this IAsyncQueryable source, Expression>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3374,13 +3374,13 @@ public static IAsyncQueryable Select(this IAsyncQuery throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Select(default(IAsyncQueryable), default(Expression>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable Select(this IAsyncQueryable source, Expression>> selector) + public static IAsyncQueryable SelectAwaitWithCancellation(this IAsyncQueryable source, Expression>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3388,13 +3388,13 @@ public static IAsyncQueryable Select(this IAsyncQuery throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Select(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>>> selector) + public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3402,13 +3402,13 @@ public static IAsyncQueryable SelectMany(this IAsyncQ throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>> selector) + public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3416,41 +3416,45 @@ public static IAsyncQueryable SelectMany(this IAsyncQ throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>>> selector) + public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>> collectionSelector, Expression> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); - if (selector == null) - throw new ArgumentNullException(nameof(selector)); + if (collectionSelector == null) + throw new ArgumentNullException(nameof(collectionSelector)); + if (resultSelector == null) + throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>), default(Expression>))), source.Expression, collectionSelector, resultSelector)); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>> selector) + public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>> collectionSelector, Expression> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); - if (selector == null) - throw new ArgumentNullException(nameof(selector)); + if (collectionSelector == null) + throw new ArgumentNullException(nameof(collectionSelector)); + if (resultSelector == null) + throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>), default(Expression>))), source.Expression, collectionSelector, resultSelector)); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>>> selector) + public static IAsyncQueryable SelectManyAwait(this IAsyncQueryable source, Expression>>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3458,13 +3462,13 @@ public static IAsyncQueryable SelectMany(this IAsyncQ throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectManyAwait(default(IAsyncQueryable), default(Expression>>>))), source.Expression, selector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>>> selector) + public static IAsyncQueryable SelectManyAwait(this IAsyncQueryable source, Expression>>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3472,13 +3476,13 @@ public static IAsyncQueryable SelectMany(this IAsyncQ throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>>))), source.Expression, selector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectManyAwait(default(IAsyncQueryable), default(Expression>>>))), source.Expression, selector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>>> collectionSelector, Expression>> resultSelector) + public static IAsyncQueryable SelectManyAwait(this IAsyncQueryable source, Expression>>> collectionSelector, Expression>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3488,13 +3492,13 @@ public static IAsyncQueryable SelectMany throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>>), default(Expression>>))), source.Expression, collectionSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectManyAwait(default(IAsyncQueryable), default(Expression>>>), default(Expression>>))), source.Expression, collectionSelector, resultSelector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>> collectionSelector, Expression> resultSelector) + public static IAsyncQueryable SelectManyAwait(this IAsyncQueryable source, Expression>>> collectionSelector, Expression>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3504,45 +3508,41 @@ public static IAsyncQueryable SelectMany throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>), default(Expression>))), source.Expression, collectionSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectManyAwait(default(IAsyncQueryable), default(Expression>>>), default(Expression>>))), source.Expression, collectionSelector, resultSelector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>>> collectionSelector, Expression>> resultSelector) + public static IAsyncQueryable SelectManyAwaitWithCancellation(this IAsyncQueryable source, Expression>>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); - if (collectionSelector == null) - throw new ArgumentNullException(nameof(collectionSelector)); - if (resultSelector == null) - throw new ArgumentNullException(nameof(resultSelector)); + if (selector == null) + throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>>), default(Expression>>))), source.Expression, collectionSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectManyAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>>))), source.Expression, selector)); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>> collectionSelector, Expression> resultSelector) + public static IAsyncQueryable SelectManyAwaitWithCancellation(this IAsyncQueryable source, Expression>>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); - if (collectionSelector == null) - throw new ArgumentNullException(nameof(collectionSelector)); - if (resultSelector == null) - throw new ArgumentNullException(nameof(resultSelector)); + if (selector == null) + throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>), default(Expression>))), source.Expression, collectionSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectManyAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>>))), source.Expression, selector)); #else - return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>>> collectionSelector, Expression>> resultSelector) + public static IAsyncQueryable SelectManyAwaitWithCancellation(this IAsyncQueryable source, Expression>>> collectionSelector, Expression>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3552,13 +3552,13 @@ public static IAsyncQueryable SelectMany throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>>), default(Expression>>))), source.Expression, collectionSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectManyAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>>), default(Expression>>))), source.Expression, collectionSelector, resultSelector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector)); #endif } - public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>>> collectionSelector, Expression>> resultSelector) + public static IAsyncQueryable SelectManyAwaitWithCancellation(this IAsyncQueryable source, Expression>>> collectionSelector, Expression>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3568,7 +3568,7 @@ public static IAsyncQueryable SelectMany throw new ArgumentNullException(nameof(resultSelector)); #if CRIPPLED_REFLECTION - return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectMany(default(IAsyncQueryable), default(Expression>>>), default(Expression>>))), source.Expression, collectionSelector, resultSelector)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SelectManyAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>>), default(Expression>>))), source.Expression, collectionSelector, resultSelector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, collectionSelector, resultSelector)); #endif @@ -3628,7 +3628,7 @@ public static ValueTask SingleAsync(this IAsyncQueryable SingleAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask SingleAwaitAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3636,13 +3636,13 @@ public static ValueTask SingleAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.SingleAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SingleAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask SingleAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3650,7 +3650,7 @@ public static ValueTask SingleAsync(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.SingleAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -3682,7 +3682,7 @@ public static ValueTask SingleOrDefaultAsync(this IAsyncQuerya #endif } - public static ValueTask SingleOrDefaultAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask SingleOrDefaultAwaitAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3690,13 +3690,13 @@ public static ValueTask SingleOrDefaultAsync(this IAsyncQuerya throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleOrDefaultAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleOrDefaultAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SingleOrDefaultAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) + public static ValueTask SingleOrDefaultAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3704,7 +3704,7 @@ public static ValueTask SingleOrDefaultAsync(this IAsyncQuerya throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleOrDefaultAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleOrDefaultAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -3748,7 +3748,7 @@ public static IAsyncQueryable SkipWhile(this IAsyncQueryable SkipWhile(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable SkipWhile(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3756,13 +3756,13 @@ public static IAsyncQueryable SkipWhile(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.SkipWhile(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SkipWhile(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable SkipWhile(this IAsyncQueryable source, Expression> predicate) + public static IAsyncQueryable SkipWhileAwait(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3770,13 +3770,13 @@ public static IAsyncQueryable SkipWhile(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.SkipWhile(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SkipWhileAwait(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable SkipWhile(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable SkipWhileAwait(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3784,13 +3784,13 @@ public static IAsyncQueryable SkipWhile(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.SkipWhile(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SkipWhileAwait(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable SkipWhile(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable SkipWhileAwaitWithCancellation(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3798,13 +3798,13 @@ public static IAsyncQueryable SkipWhile(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.SkipWhile(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SkipWhileAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable SkipWhile(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable SkipWhileAwaitWithCancellation(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3812,7 +3812,7 @@ public static IAsyncQueryable SkipWhile(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.SkipWhile(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SkipWhileAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif @@ -3938,7 +3938,7 @@ public static ValueTask SumAsync(this IAsyncQueryable source, Cancel #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3946,13 +3946,13 @@ public static ValueTask SumAsync(this IAsyncQueryable source, Cancel throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3960,13 +3960,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3974,13 +3974,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -3988,13 +3988,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4002,13 +4002,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4016,13 +4016,13 @@ public static ValueTask SumAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4030,13 +4030,13 @@ public static ValueTask SumAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4044,13 +4044,13 @@ public static ValueTask SumAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4058,13 +4058,13 @@ public static ValueTask SumAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4072,13 +4072,13 @@ public static ValueTask SumAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4086,13 +4086,13 @@ public static ValueTask SumAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4100,13 +4100,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4114,13 +4114,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4128,13 +4128,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4142,13 +4142,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4156,13 +4156,13 @@ public static ValueTask SumAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4170,13 +4170,13 @@ public static ValueTask SumAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4184,13 +4184,13 @@ public static ValueTask SumAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4198,13 +4198,13 @@ public static ValueTask SumAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4212,13 +4212,13 @@ public static ValueTask SumAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4226,13 +4226,13 @@ public static ValueTask SumAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4240,13 +4240,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4254,13 +4254,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4268,13 +4268,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4282,13 +4282,13 @@ public static ValueTask SumAsync(this IAsyncQueryable throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4296,13 +4296,13 @@ public static ValueTask SumAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4310,13 +4310,13 @@ public static ValueTask SumAsync(this IAsyncQueryable s throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4324,13 +4324,13 @@ public static ValueTask SumAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4338,13 +4338,13 @@ public static ValueTask SumAsync(this IAsyncQueryable sou throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask SumAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4352,7 +4352,7 @@ public static ValueTask SumAsync(this IAsyncQueryable so throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SumAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -4396,7 +4396,7 @@ public static IAsyncQueryable TakeWhile(this IAsyncQueryable TakeWhile(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable TakeWhile(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4404,13 +4404,13 @@ public static IAsyncQueryable TakeWhile(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.TakeWhile(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.TakeWhile(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable TakeWhile(this IAsyncQueryable source, Expression> predicate) + public static IAsyncQueryable TakeWhileAwait(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4418,13 +4418,13 @@ public static IAsyncQueryable TakeWhile(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.TakeWhile(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.TakeWhileAwait(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable TakeWhile(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable TakeWhileAwait(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4432,13 +4432,13 @@ public static IAsyncQueryable TakeWhile(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.TakeWhile(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.TakeWhileAwait(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable TakeWhile(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable TakeWhileAwaitWithCancellation(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4446,13 +4446,13 @@ public static IAsyncQueryable TakeWhile(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.TakeWhile(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.TakeWhileAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable TakeWhile(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable TakeWhileAwaitWithCancellation(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4460,13 +4460,13 @@ public static IAsyncQueryable TakeWhile(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.TakeWhile(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.TakeWhileAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IOrderedAsyncQueryable ThenBy(this IOrderedAsyncQueryable source, Expression>> keySelector) + public static IOrderedAsyncQueryable ThenBy(this IOrderedAsyncQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4474,13 +4474,13 @@ public static IOrderedAsyncQueryable ThenBy(this IOrdere throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), default(Expression>))), source.Expression, keySelector)); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable ThenBy(this IOrderedAsyncQueryable source, Expression> keySelector) + public static IOrderedAsyncQueryable ThenBy(this IOrderedAsyncQueryable source, Expression> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4488,13 +4488,13 @@ public static IOrderedAsyncQueryable ThenBy(this IOrdere throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), default(Expression>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), default(Expression>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif } - public static IOrderedAsyncQueryable ThenBy(this IOrderedAsyncQueryable source, Expression>> keySelector) + public static IOrderedAsyncQueryable ThenByAwait(this IOrderedAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4502,13 +4502,13 @@ public static IOrderedAsyncQueryable ThenBy(this IOrdere throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByAwait(default(IOrderedAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable ThenBy(this IOrderedAsyncQueryable source, Expression>> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable ThenByAwait(this IOrderedAsyncQueryable source, Expression>> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4516,13 +4516,13 @@ public static IOrderedAsyncQueryable ThenBy(this IOrdere throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByAwait(default(IOrderedAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif } - public static IOrderedAsyncQueryable ThenBy(this IOrderedAsyncQueryable source, Expression> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable ThenByAwaitWithCancellation(this IOrderedAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4530,13 +4530,13 @@ public static IOrderedAsyncQueryable ThenBy(this IOrdere throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), default(Expression>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByAwaitWithCancellation(default(IOrderedAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); #else - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable ThenBy(this IOrderedAsyncQueryable source, Expression>> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable ThenByAwaitWithCancellation(this IOrderedAsyncQueryable source, Expression>> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4544,13 +4544,13 @@ public static IOrderedAsyncQueryable ThenBy(this IOrdere throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenBy(default(IOrderedAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByAwaitWithCancellation(default(IOrderedAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif } - public static IOrderedAsyncQueryable ThenByDescending(this IOrderedAsyncQueryable source, Expression>> keySelector) + public static IOrderedAsyncQueryable ThenByDescending(this IOrderedAsyncQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4558,13 +4558,13 @@ public static IOrderedAsyncQueryable ThenByDescending(th throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), default(Expression>))), source.Expression, keySelector)); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable ThenByDescending(this IOrderedAsyncQueryable source, Expression> keySelector) + public static IOrderedAsyncQueryable ThenByDescending(this IOrderedAsyncQueryable source, Expression> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4572,13 +4572,13 @@ public static IOrderedAsyncQueryable ThenByDescending(th throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), default(Expression>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), default(Expression>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif } - public static IOrderedAsyncQueryable ThenByDescending(this IOrderedAsyncQueryable source, Expression>> keySelector) + public static IOrderedAsyncQueryable ThenByDescendingAwait(this IOrderedAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4586,13 +4586,13 @@ public static IOrderedAsyncQueryable ThenByDescending(th throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescendingAwait(default(IOrderedAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable ThenByDescending(this IOrderedAsyncQueryable source, Expression>> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable ThenByDescendingAwait(this IOrderedAsyncQueryable source, Expression>> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4600,13 +4600,13 @@ public static IOrderedAsyncQueryable ThenByDescending(th throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescendingAwait(default(IOrderedAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif } - public static IOrderedAsyncQueryable ThenByDescending(this IOrderedAsyncQueryable source, Expression> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable ThenByDescendingAwaitWithCancellation(this IOrderedAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4614,13 +4614,13 @@ public static IOrderedAsyncQueryable ThenByDescending(th throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), default(Expression>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescendingAwaitWithCancellation(default(IOrderedAsyncQueryable), default(Expression>>))), source.Expression, keySelector)); #else - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector)); #endif } - public static IOrderedAsyncQueryable ThenByDescending(this IOrderedAsyncQueryable source, Expression>> keySelector, IComparer comparer) + public static IOrderedAsyncQueryable ThenByDescendingAwaitWithCancellation(this IOrderedAsyncQueryable source, Expression>> keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4628,7 +4628,7 @@ public static IOrderedAsyncQueryable ThenByDescending(th throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescending(default(IOrderedAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); + return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ThenByDescendingAwaitWithCancellation(default(IOrderedAsyncQueryable), default(Expression>>), default(IComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #else return (IOrderedAsyncQueryable)source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)))); #endif @@ -4646,7 +4646,7 @@ public static ValueTask ToArrayAsync(this IAsyncQueryable> ToDictionaryAsync(this IAsyncQueryable source, Expression>> keySelector, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression> keySelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4654,13 +4654,13 @@ public static ValueTask> ToDictionaryAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression> keySelector, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4668,41 +4668,45 @@ public static ValueTask> ToDictionaryAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression>> keySelector, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); + if (elementSelector == null) + throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>), default(Expression>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); + if (elementSelector == null) + throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>), default(Expression>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncQueryable source, Expression>> keySelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4710,13 +4714,13 @@ public static ValueTask> ToDictionaryAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4724,13 +4728,13 @@ public static ValueTask> ToDictionaryAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4740,13 +4744,13 @@ public static ValueTask> ToDictionaryAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4756,45 +4760,41 @@ public static ValueTask> ToDictionaryAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>), default(Expression>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> keySelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); - if (elementSelector == null) - throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); - if (elementSelector == null) - throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4804,13 +4804,13 @@ public static ValueTask> ToDictionaryAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>), default(Expression>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToDictionaryAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4820,7 +4820,7 @@ public static ValueTask> ToDictionaryAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionaryAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -4862,7 +4862,7 @@ public static ValueTask> ToListAsync(this IAsyncQueryable #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression>> keySelector, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression> keySelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4870,13 +4870,13 @@ public static ValueTask> ToLookupAsync(thi throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression> keySelector, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4884,41 +4884,45 @@ public static ValueTask> ToLookupAsync(thi throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression>> keySelector, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); + if (elementSelector == null) + throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>), default(Expression>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); + if (elementSelector == null) + throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>), default(Expression>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitAsync(this IAsyncQueryable source, Expression>> keySelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4926,13 +4930,13 @@ public static ValueTask> ToLookupAsync(thi throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitAsync(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4940,13 +4944,13 @@ public static ValueTask> ToLookupAsync(thi throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4956,13 +4960,13 @@ public static ValueTask> ToLookupAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -4972,45 +4976,41 @@ public static ValueTask> ToLookupAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>), default(Expression>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAwaitAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> keySelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); - if (elementSelector == null) - throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); - if (elementSelector == null) - throw new ArgumentNullException(nameof(elementSelector)); #if CRIPPLED_REFLECTION - return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -5020,13 +5020,13 @@ public static ValueTask> ToLookupAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>), default(Expression>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else - return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } - public static ValueTask> ToLookupAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -5036,7 +5036,7 @@ public static ValueTask> ToLookupAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); + return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookupAwaitWithCancellationAsync(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer), default(CancellationToken))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif @@ -5084,7 +5084,7 @@ public static IAsyncQueryable Where(this IAsyncQueryable Where(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable Where(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -5092,13 +5092,13 @@ public static IAsyncQueryable Where(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.Where(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Where(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable Where(this IAsyncQueryable source, Expression> predicate) + public static IAsyncQueryable WhereAwait(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -5106,13 +5106,13 @@ public static IAsyncQueryable Where(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.Where(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.WhereAwait(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable Where(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable WhereAwait(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -5120,13 +5120,13 @@ public static IAsyncQueryable Where(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.Where(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.WhereAwait(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable Where(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable WhereAwaitWithCancellation(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -5134,13 +5134,13 @@ public static IAsyncQueryable Where(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.Where(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.WhereAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable Where(this IAsyncQueryable source, Expression>> predicate) + public static IAsyncQueryable WhereAwaitWithCancellation(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -5148,13 +5148,13 @@ public static IAsyncQueryable Where(this IAsyncQueryable(Expression.Call(InfoOf(() => AsyncQueryable.Where(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); + return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.WhereAwaitWithCancellation(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate)); #endif } - public static IAsyncQueryable Zip(this IAsyncQueryable first, IAsyncEnumerable second, Expression>> selector) + public static IAsyncQueryable Zip(this IAsyncQueryable first, IAsyncEnumerable second, Expression> selector) { if (first == null) throw new ArgumentNullException(nameof(first)); @@ -5164,13 +5164,13 @@ public static IAsyncQueryable Zip(this IAsync throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Zip(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>))), first.Expression, GetSourceExpression(second), selector)); + return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Zip(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>))), first.Expression, GetSourceExpression(second), selector)); #else return first.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TResult)), first.Expression, GetSourceExpression(second), selector)); #endif } - public static IAsyncQueryable Zip(this IAsyncQueryable first, IAsyncEnumerable second, Expression> selector) + public static IAsyncQueryable ZipAwait(this IAsyncQueryable first, IAsyncEnumerable second, Expression>> selector) { if (first == null) throw new ArgumentNullException(nameof(first)); @@ -5180,13 +5180,13 @@ public static IAsyncQueryable Zip(this IAsync throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Zip(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>))), first.Expression, GetSourceExpression(second), selector)); + return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ZipAwait(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>))), first.Expression, GetSourceExpression(second), selector)); #else return first.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TResult)), first.Expression, GetSourceExpression(second), selector)); #endif } - public static IAsyncQueryable Zip(this IAsyncQueryable first, IAsyncEnumerable second, Expression>> selector) + public static IAsyncQueryable ZipAwaitWithCancellation(this IAsyncQueryable first, IAsyncEnumerable second, Expression>> selector) { if (first == null) throw new ArgumentNullException(nameof(first)); @@ -5196,7 +5196,7 @@ public static IAsyncQueryable Zip(this IAsync throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION - return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Zip(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>))), first.Expression, GetSourceExpression(second), selector)); + return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.ZipAwaitWithCancellation(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>))), first.Expression, GetSourceExpression(second), selector)); #else return first.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TResult)), first.Expression, GetSourceExpression(second), selector)); #endif diff --git a/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.Generated.tt b/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.Generated.tt index deb78e6915..3f1079d6ea 100644 --- a/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.Generated.tt @@ -15,7 +15,7 @@ <#@ output extension=".cs" #> <# var nullableParameterNames = new[] { "comparer" }; -var exclude = new[] { "ForEach", "ForEachAsync", "ToEnumerable", "ToAsyncEnumerable", "ToObservable", "AsAsyncEnumerable", "WithCancellation" }; +var exclude = new[] { "ForEachAsync", "ForEachAwaitAsync", "ForEachAwaitWithCancellationAsync", "ToEnumerable", "ToAsyncEnumerable", "ToObservable", "AsAsyncEnumerable", "WithCancellation" }; var toQuotedImpl = default(Func); toQuotedImpl = (t, i, b) => diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/AsyncEnumerableNamingTests.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/AsyncEnumerableNamingTests.cs new file mode 100644 index 0000000000..6f6baf15de --- /dev/null +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/AsyncEnumerableNamingTests.cs @@ -0,0 +1,84 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.Linq; +using System.Reflection; +using System.Threading; +using System.Threading.Tasks; +using Xunit; + +namespace Tests +{ + public class AsyncEnumerableNamingTests + { + [Fact] + public static void AsyncEnumerable_MethodNames() + { + var methods = typeof(AsyncEnumerable).GetMethods(BindingFlags.Public | BindingFlags.Static); + + // + // Async suffix + // + + var asyncMethodsNoAsyncSuffix = (from m in methods + where IsTaskLike(m.ReturnType) + where !m.Name.EndsWith("Async") + select m.Name) + .ToArray(); + + Assert.Empty(asyncMethodsNoAsyncSuffix); + + // + // Consistency of delegate types and Await[WithCancellation] naming convention + // + + var methodsWithDelegateParameter = (from m in methods + where m.GetParameters().Any(p => IsAsyncDelegate(p.ParameterType)) + select m) + .ToArray(); + + foreach (var m in methodsWithDelegateParameter) + { + var kinds = (from p in m.GetParameters() + where IsDelegate(p.ParameterType) + select GetDelegateKind(p.ParameterType)) + .Distinct(); + + Assert.Single(kinds); + + var suffix = IsTaskLike(m.ReturnType) ? "Async" : ""; + + switch (kinds.Single()) + { + case DelegateKind.Async: + suffix = "Await" + suffix; + break; + case DelegateKind.AsyncCancel: + suffix = "AwaitWithCancellation" + suffix; + break; + } + + Assert.EndsWith(suffix, m.Name); + } + + static bool IsValueTask(Type t) => t == typeof(ValueTask) || (t.IsConstructedGenericType && t.GetGenericTypeDefinition() == typeof(ValueTask<>)); + static bool IsTask(Type t) => typeof(Task).IsAssignableFrom(t); + static bool IsTaskLike(Type t) => IsTask(t) || IsValueTask(t); + + static bool IsDelegate(Type t) => typeof(Delegate).IsAssignableFrom(t); + static bool TryGetInvoke(Type t, out MethodInfo m) => (m = t.GetMethod("Invoke")) != null; + static bool IsAsyncDelegate(Type t) => IsDelegate(t) && TryGetInvoke(t, out var i) && IsTaskLike(i.ReturnType); + static bool IsCancelableDelegate(Type t) => IsDelegate(t) && TryGetInvoke(t, out var i) && i.GetParameters().LastOrDefault()?.ParameterType == typeof(CancellationToken); + static DelegateKind GetDelegateKind(Type t) => IsAsyncDelegate(t) ? (IsCancelableDelegate(t) ? DelegateKind.AsyncCancel : DelegateKind.Async) : DelegateKind.Sync; + } + + private enum DelegateKind + { + Sync, + Async, + AsyncCancel, + } + } +} diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Aggregate.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Aggregate.cs index 336ebf9c4f..4bed06506f 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Aggregate.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Aggregate.cs @@ -13,23 +13,23 @@ namespace Tests public class Aggregate : AsyncEnumerableTests { [Fact] - public async Task AggregateAsync_Sync_Null() + public async Task AggregateAsync_Null() { await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, (x, y) => x + y).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, default(Func)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, default).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y) => x + y).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default(Func)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y) => x + y, z => z).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default, z => z).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, (x, y) => x + y, default).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, (x, y) => x + y, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, default, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y) => x + y, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y) => x + y, z => z, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default, z => z, CancellationToken.None).AsTask()); @@ -37,7 +37,7 @@ public async Task AggregateAsync_Sync_Null() } [Fact] - public async Task AggregateAsync_Sync_Simple() + public async Task AggregateAsync_Simple() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.AggregateAsync((x, y) => x * y); @@ -45,7 +45,7 @@ public async Task AggregateAsync_Sync_Simple() } [Fact] - public async Task AggregateAsync_Sync_Empty() + public async Task AggregateAsync_Empty() { var xs = new int[0].ToAsyncEnumerable(); var ys = xs.AggregateAsync((x, y) => x * y); @@ -53,7 +53,7 @@ public async Task AggregateAsync_Sync_Empty() } [Fact] - public async Task AggregateAsync_Sync_Throw_Source() + public async Task AggregateAsync_Throw_Source() { var ex = new Exception("Bang!"); var xs = Throw(ex); @@ -62,7 +62,7 @@ public async Task AggregateAsync_Sync_Throw_Source() } [Fact] - public async Task AggregateAsync_Sync_Throw_Selector() + public async Task AggregateAsync_Throw_Selector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); @@ -71,7 +71,7 @@ public async Task AggregateAsync_Sync_Throw_Selector() } [Fact] - public async Task AggregateAsync_Sync_Seed_Simple() + public async Task AggregateAsync_Seed_Simple() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.AggregateAsync(1, (x, y) => x * y); @@ -79,7 +79,7 @@ public async Task AggregateAsync_Sync_Seed_Simple() } [Fact] - public async Task AggregateAsync_Sync_Seed_Emtpy() + public async Task AggregateAsync_Seed_Emtpy() { var xs = new int[0].ToAsyncEnumerable(); var ys = xs.AggregateAsync(1, (x, y) => x * y); @@ -87,7 +87,7 @@ public async Task AggregateAsync_Sync_Seed_Emtpy() } [Fact] - public async Task AggregateAsync_Sync_Seed_Throw_Source() + public async Task AggregateAsync_Seed_Throw_Source() { var ex = new Exception("Bang!"); var xs = Throw(ex); @@ -96,7 +96,7 @@ public async Task AggregateAsync_Sync_Seed_Throw_Source() } [Fact] - public async Task AggregateAsync_Sync_Seed_Throw_Selector() + public async Task AggregateAsync_Seed_Throw_Selector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); @@ -105,7 +105,7 @@ public async Task AggregateAsync_Sync_Seed_Throw_Selector() } [Fact] - public async Task AggregateAsync_Sync_Seed_Result_Simple() + public async Task AggregateAsync_Seed_Result_Simple() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.AggregateAsync(1, (x, y) => x * y, x => x + 1); @@ -113,7 +113,7 @@ public async Task AggregateAsync_Sync_Seed_Result_Simple() } [Fact] - public async Task AggregateAsync_Sync_Seed_Result_Empty() + public async Task AggregateAsync_Seed_Result_Empty() { var xs = new int[0].ToAsyncEnumerable(); var ys = xs.AggregateAsync(1, (x, y) => x * y, x => x + 1); @@ -121,7 +121,7 @@ public async Task AggregateAsync_Sync_Seed_Result_Empty() } [Fact] - public async Task AggregateAsync_Sync_Seed_Result_Throw_Source() + public async Task AggregateAsync_Seed_Result_Throw_Source() { var ex = new Exception("Bang!"); var xs = Throw(ex); @@ -130,7 +130,7 @@ public async Task AggregateAsync_Sync_Seed_Result_Throw_Source() } [Fact] - public async Task AggregateAsync_Sync_Seed_Result_Throw_Selector() + public async Task AggregateAsync_Seed_Result_Throw_Selector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); @@ -139,7 +139,7 @@ public async Task AggregateAsync_Sync_Seed_Result_Throw_Selector() } [Fact] - public async Task AggregateAsync_Sync_Seed_Result_Throw_ResultSelector() + public async Task AggregateAsync_Seed_Result_Throw_ResultSelector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); @@ -148,273 +148,273 @@ public async Task AggregateAsync_Sync_Seed_Result_Throw_ResultSelector() } [Fact] - public async Task AggregateAsync_Async_Null() + public async Task AggregateAwaitAsync_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, (x, y) => new ValueTask(x + y)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(default, (x, y) => new ValueTask(x + y)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y) => new ValueTask(x + y)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(default, 0, (x, y) => new ValueTask(x + y)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(Return42, 0, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y) => new ValueTask(x + y), z => new ValueTask(z)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default(Func>), z => new ValueTask(z)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, (x, y) => new ValueTask(x + y), default).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(default, 0, (x, y) => new ValueTask(x + y), z => new ValueTask(z)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(Return42, 0, default, z => new ValueTask(z)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(Return42, 0, (x, y) => new ValueTask(x + y), default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, (x, y) => new ValueTask(x + y), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(default, (x, y) => new ValueTask(x + y), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(Return42, default, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y) => new ValueTask(x + y), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(default, 0, (x, y) => new ValueTask(x + y), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(Return42, 0, default, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y) => new ValueTask(x + y), z => new ValueTask(z), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default(Func>), z => new ValueTask(z), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, (x, y) => new ValueTask(x + y), default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(default, 0, (x, y) => new ValueTask(x + y), z => new ValueTask(z), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(Return42, 0, default, z => new ValueTask(z), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitAsync(Return42, 0, (x, y) => new ValueTask(x + y), default, CancellationToken.None).AsTask()); } [Fact] - public async Task AggregateAsync_Async_Simple() + public async Task AggregateAwaitAsync_Simple() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync((x, y) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitAsync((x, y) => new ValueTask(x * y)); Assert.Equal(24, await ys); } [Fact] - public async Task AggregateAsync_Async_Empty() + public async Task AggregateAwaitAsync_Empty() { var xs = new int[0].ToAsyncEnumerable(); - var ys = xs.AggregateAsync((x, y) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitAsync((x, y) => new ValueTask(x * y)); await AssertThrowsAsync(ys.AsTask()); } [Fact] - public async Task AggregateAsync_Async_Throw_Source() + public async Task AggregateAwaitAsync_Throw_Source() { var ex = new Exception("Bang!"); var xs = Throw(ex); - var ys = xs.AggregateAsync((x, y) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitAsync((x, y) => new ValueTask(x * y)); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_Async_Throw_Selector() + public async Task AggregateAwaitAsync_Throw_Selector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(new Func>((x, y) => { throw ex; })); + var ys = xs.AggregateAwaitAsync(new Func>((x, y) => { throw ex; })); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_Async_Seed_Simple() + public async Task AggregateAwaitAsync_Seed_Simple() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, (x, y) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitAsync(1, (x, y) => new ValueTask(x * y)); Assert.Equal(24, await ys); } [Fact] - public async Task AggregateAsync_Async_Seed_Emtpy() + public async Task AggregateAwaitAsync_Seed_Emtpy() { var xs = new int[0].ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, (x, y) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitAsync(1, (x, y) => new ValueTask(x * y)); Assert.Equal(1, await ys); } [Fact] - public async Task AggregateAsync_Async_Seed_Throw_Source() + public async Task AggregateAwaitAsync_Seed_Throw_Source() { var ex = new Exception("Bang!"); var xs = Throw(ex); - var ys = xs.AggregateAsync(1, (x, y) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitAsync(1, (x, y) => new ValueTask(x * y)); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_Async_Seed_Throw_Selector() + public async Task AggregateAwaitAsync_Seed_Throw_Selector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, new Func>((x, y) => { throw ex; })); + var ys = xs.AggregateAwaitAsync(1, new Func>((x, y) => { throw ex; })); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_Async_Seed_Result_Simple() + public async Task AggregateAwaitAsync_Seed_Result_Simple() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, (x, y) => new ValueTask(x * y), x => new ValueTask(x + 1)); + var ys = xs.AggregateAwaitAsync(1, (x, y) => new ValueTask(x * y), x => new ValueTask(x + 1)); Assert.Equal(25, await ys); } [Fact] - public async Task AggregateAsync_Async_Seed_Result_Empty() + public async Task AggregateAwaitAsync_Seed_Result_Empty() { var xs = new int[0].ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, (x, y) => new ValueTask(x * y), x => new ValueTask(x + 1)); + var ys = xs.AggregateAwaitAsync(1, (x, y) => new ValueTask(x * y), x => new ValueTask(x + 1)); Assert.Equal(2, await ys); } [Fact] - public async Task AggregateAsync_Async_Seed_Result_Throw_Source() + public async Task AggregateAwaitAsync_Seed_Result_Throw_Source() { var ex = new Exception("Bang!"); var xs = Throw(ex); - var ys = xs.AggregateAsync(1, (x, y) => new ValueTask(x * y), x => new ValueTask(x + 1)); + var ys = xs.AggregateAwaitAsync(1, (x, y) => new ValueTask(x * y), x => new ValueTask(x + 1)); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_Async_Seed_Result_Throw_Selector() + public async Task AggregateAwaitAsync_Seed_Result_Throw_Selector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, new Func>((x, y) => { throw ex; }), x => new ValueTask(x + 1)); + var ys = xs.AggregateAwaitAsync(1, new Func>((x, y) => { throw ex; }), x => new ValueTask(x + 1)); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_Async_Seed_Result_Throw_ResultSelector() + public async Task AggregateAwaitAsync_Seed_Result_Throw_ResultSelector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, (x, y) => new ValueTask(x * y), x => { throw ex; }); + var ys = xs.AggregateAwaitAsync(1, (x, y) => new ValueTask(x * y), x => { throw ex; }); await AssertThrowsAsync(ys, ex); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AggregateAsync_AsyncCancel_Null() + public async Task AggregateAwaitWithCancellationAsync_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, (x, y, ct) => new ValueTask(x + y)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(default, (x, y, ct) => new ValueTask(x + y)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y, ct) => new ValueTask(x + y)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(default, 0, (x, y, ct) => new ValueTask(x + y)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(Return42, 0, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y, ct) => new ValueTask(x + y), (z, ct) => new ValueTask(z)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default, (z, ct) => new ValueTask(z)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, (x, y, ct) => new ValueTask(x + y), default).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(default, 0, (x, y, ct) => new ValueTask(x + y), (z, ct) => new ValueTask(z)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(Return42, 0, default, (z, ct) => new ValueTask(z)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(Return42, 0, (x, y, ct) => new ValueTask(x + y), default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, (x, y, ct) => new ValueTask(x + y), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(default, (x, y, ct) => new ValueTask(x + y), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(Return42, default, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y, ct) => new ValueTask(x + y), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(default, 0, (x, y, ct) => new ValueTask(x + y), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(Return42, 0, default, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(default, 0, (x, y, ct) => new ValueTask(x + y), (z, ct) => new ValueTask(z), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, default, (z, ct) => new ValueTask(z), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAsync(Return42, 0, (x, y, ct) => new ValueTask(x + y), default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(default, 0, (x, y, ct) => new ValueTask(x + y), (z, ct) => new ValueTask(z), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(Return42, 0, default, (z, ct) => new ValueTask(z), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AggregateAwaitWithCancellationAsync(Return42, 0, (x, y, ct) => new ValueTask(x + y), default, CancellationToken.None).AsTask()); } [Fact] - public async Task AggregateAsync_AsyncCancel_Simple() + public async Task AggregateAwaitWithCancellationAsync_Simple() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync((x, y, ct) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitWithCancellationAsync((x, y, ct) => new ValueTask(x * y)); Assert.Equal(24, await ys); } [Fact] - public async Task AggregateAsync_AsyncCancel_Empty() + public async Task AggregateAwaitWithCancellationAsync_Empty() { var xs = new int[0].ToAsyncEnumerable(); - var ys = xs.AggregateAsync((x, y, ct) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitWithCancellationAsync((x, y, ct) => new ValueTask(x * y)); await AssertThrowsAsync(ys.AsTask()); } [Fact] - public async Task AggregateAsync_AsyncCancel_Throw_Source() + public async Task AggregateAwaitWithCancellationAsync_Throw_Source() { var ex = new Exception("Bang!"); var xs = Throw(ex); - var ys = xs.AggregateAsync((x, y, ct) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitWithCancellationAsync((x, y, ct) => new ValueTask(x * y)); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_AsyncCancel_Throw_Selector() + public async Task AggregateAwaitWithCancellationAsync_Throw_Selector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(new Func>((x, y, ct) => { throw ex; })); + var ys = xs.AggregateAwaitWithCancellationAsync(new Func>((x, y, ct) => { throw ex; })); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_AsyncCancel_Seed_Simple() + public async Task AggregateAwaitWithCancellationAsync_Seed_Simple() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, (x, y, ct) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitWithCancellationAsync(1, (x, y, ct) => new ValueTask(x * y)); Assert.Equal(24, await ys); } [Fact] - public async Task AggregateAsync_AsyncCancel_Seed_Emtpy() + public async Task AggregateAwaitWithCancellationAsync_Seed_Emtpy() { var xs = new int[0].ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, (x, y, ct) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitWithCancellationAsync(1, (x, y, ct) => new ValueTask(x * y)); Assert.Equal(1, await ys); } [Fact] - public async Task AggregateAsync_AsyncCancel_Seed_Throw_Source() + public async Task AggregateAwaitWithCancellationAsync_Seed_Throw_Source() { var ex = new Exception("Bang!"); var xs = Throw(ex); - var ys = xs.AggregateAsync(1, (x, y, ct) => new ValueTask(x * y)); + var ys = xs.AggregateAwaitWithCancellationAsync(1, (x, y, ct) => new ValueTask(x * y)); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_AsyncCancel_Seed_Throw_Selector() + public async Task AggregateAwaitWithCancellationAsync_Seed_Throw_Selector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, new Func>((x, y, ct) => { throw ex; })); + var ys = xs.AggregateAwaitWithCancellationAsync(1, new Func>((x, y, ct) => { throw ex; })); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_AsyncCancel_Seed_Result_Simple() + public async Task AggregateAwaitWithCancellationAsync_Seed_Result_Simple() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, (x, y, ct) => new ValueTask(x * y), (x, ct) => new ValueTask(x + 1)); + var ys = xs.AggregateAwaitWithCancellationAsync(1, (x, y, ct) => new ValueTask(x * y), (x, ct) => new ValueTask(x + 1)); Assert.Equal(25, await ys); } [Fact] - public async Task AggregateAsync_AsyncCancel_Seed_Result_Empty() + public async Task AggregateAwaitWithCancellationAsync_Seed_Result_Empty() { var xs = new int[0].ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, (x, y, ct) => new ValueTask(x * y), (x, ct) => new ValueTask(x + 1)); + var ys = xs.AggregateAwaitWithCancellationAsync(1, (x, y, ct) => new ValueTask(x * y), (x, ct) => new ValueTask(x + 1)); Assert.Equal(2, await ys); } [Fact] - public async Task AggregateAsync_AsyncCancel_Seed_Result_Throw_Source() + public async Task AggregateAwaitWithCancellationAsync_Seed_Result_Throw_Source() { var ex = new Exception("Bang!"); var xs = Throw(ex); - var ys = xs.AggregateAsync(1, (x, y, ct) => new ValueTask(x * y), (x, ct) => new ValueTask(x + 1)); + var ys = xs.AggregateAwaitWithCancellationAsync(1, (x, y, ct) => new ValueTask(x * y), (x, ct) => new ValueTask(x + 1)); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_AsyncCancel_Seed_Result_Throw_Selector() + public async Task AggregateAwaitWithCancellationAsync_Seed_Result_Throw_Selector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, new Func>((x, y, ct) => { throw ex; }), (x, ct) => new ValueTask(x + 1)); + var ys = xs.AggregateAwaitWithCancellationAsync(1, new Func>((x, y, ct) => { throw ex; }), (x, ct) => new ValueTask(x + 1)); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task AggregateAsync_AsyncCancel_Seed_Result_Throw_ResultSelector() + public async Task AggregateAwaitWithCancellationAsync_Seed_Result_Throw_ResultSelector() { var ex = new Exception("Bang!"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.AggregateAsync(1, (x, y, ct) => new ValueTask(x * y), (x, ct) => { throw ex; }); + var ys = xs.AggregateAwaitWithCancellationAsync(1, (x, y, ct) => new ValueTask(x * y), (x, ct) => { throw ex; }); await AssertThrowsAsync(ys, ex); } #endif diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/All.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/All.cs index 72164be139..332f848b62 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/All.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/All.cs @@ -13,31 +13,31 @@ namespace Tests public class All : AsyncEnumerableTests { [Fact] - public async Task AllAsync_Sync_Null() + public async Task AllAsync_Null() { await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(default, x => true).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(Return42, default(Func)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(Return42, default).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(default, x => true, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(Return42, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task AllAsync_Sync_Simple_False() + public async Task AllAsync_Simple_False() { var res = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable().AllAsync(x => x % 2 == 0); Assert.False(await res); } [Fact] - public async Task AllAsync_Sync_Simple_True() + public async Task AllAsync_Simple_True() { var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AllAsync(x => x % 2 == 0); Assert.True(await res); } [Fact] - public async Task AllAsync_Sync_Throw_Source() + public async Task AllAsync_Throw_Source() { var ex = new Exception("Bang!"); var res = Throw(ex).AllAsync(x => x % 2 == 0); @@ -45,7 +45,7 @@ public async Task AllAsync_Sync_Throw_Source() } [Fact] - public async Task AllAsync_Sync_Throw_Selector() + public async Task AllAsync_Throw_Selector() { var ex = new Exception("Bang!"); var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AllAsync(new Func(x => { throw ex; })); @@ -53,83 +53,83 @@ public async Task AllAsync_Sync_Throw_Selector() } [Fact] - public async Task AllAsync_Async_Null() + public async Task AllAwaitAsync_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(default, x => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AllAwaitAsync(default, x => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AllAwaitAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AllAwaitAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AllAwaitAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task AllAsync_Async_Simple_False() + public async Task AllAwaitAsync_Simple_False() { - var res = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable().AllAsync(x => new ValueTask(x % 2 == 0)); + var res = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable().AllAwaitAsync(x => new ValueTask(x % 2 == 0)); Assert.False(await res); } [Fact] - public async Task AllAsync_Async_Simple_True() + public async Task AllAwaitAsync_Simple_True() { - var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AllAsync(x => new ValueTask(x % 2 == 0)); + var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AllAwaitAsync(x => new ValueTask(x % 2 == 0)); Assert.True(await res); } [Fact] - public async Task AllAsync_Async_Throw_Source() + public async Task AllAwaitAsync_Throw_Source() { var ex = new Exception("Bang!"); - var res = Throw(ex).AllAsync(x => new ValueTask(x % 2 == 0)); + var res = Throw(ex).AllAwaitAsync(x => new ValueTask(x % 2 == 0)); await AssertThrowsAsync(res, ex); } [Fact] - public async Task AllAsync_Async_Throw_Selector() + public async Task AllAwaitAsync_Throw_Selector() { var ex = new Exception("Bang!"); - var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AllAsync(new Func>(x => { throw ex; })); + var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AllAwaitAsync(new Func>(x => { throw ex; })); await AssertThrowsAsync(res, ex); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AllAsync_AsyncCancel_Null() + public async Task AllAwaitWithCancellationAsync_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(default, (x, ct) => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AllAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AllAwaitWithCancellationAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AllAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AllAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AllAwaitWithCancellationAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task AllAsync_AsyncCancel_Simple_False() + public async Task AllAwaitWithCancellationAsync_Simple_False() { - var res = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable().AllAsync((x, ct) => new ValueTask(x % 2 == 0)); + var res = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable().AllAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 == 0)); Assert.False(await res); } [Fact] - public async Task AllAsync_AsyncCancel_Simple_True() + public async Task AllAwaitWithCancellationAsync_Simple_True() { - var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AllAsync((x, ct) => new ValueTask(x % 2 == 0)); + var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AllAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 == 0)); Assert.True(await res); } [Fact] - public async Task AllAsync_AsyncCancel_Throw_Source() + public async Task AllAwaitWithCancellationAsync_Throw_Source() { var ex = new Exception("Bang!"); - var res = Throw(ex).AllAsync((x, ct) => new ValueTask(x % 2 == 0)); + var res = Throw(ex).AllAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 == 0)); await AssertThrowsAsync(res, ex); } [Fact] - public async Task AllAsync_AsyncCancel_Throw_Selector() + public async Task AllAwaitWithCancellationAsync_Throw_Selector() { var ex = new Exception("Bang!"); - var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AllAsync(new Func>((x, ct) => { throw ex; })); + var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AllAwaitWithCancellationAsync(new Func>((x, ct) => { throw ex; })); await AssertThrowsAsync(res, ex); } #endif diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Any.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Any.cs index dfe096219a..4f7c5dbcf2 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Any.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Any.cs @@ -13,7 +13,7 @@ namespace Tests public class Any : AsyncEnumerableTests { [Fact] - public async Task AnyAsync_Sync_Null() + public async Task AnyAsync_Null() { await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(default).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(default, CancellationToken.None).AsTask()); @@ -22,7 +22,7 @@ public async Task AnyAsync_Sync_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(Return42, default(Func)).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(default, x => true, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(Return42, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] @@ -70,83 +70,83 @@ public async Task AnyAsync_NoSelector_Empty() } [Fact] - public async Task AnyAsync_Async_Null() + public async Task AnyAwaitAsync_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(default, x => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAwaitAsync(default, x => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAwaitAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAwaitAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAwaitAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task AnyAsync_Async_Simple_True() + public async Task AnyAwaitAsync_Simple_True() { - var res = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable().AnyAsync(x => new ValueTask(x % 2 == 0)); + var res = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable().AnyAwaitAsync(x => new ValueTask(x % 2 == 0)); Assert.True(await res); } [Fact] - public async Task AnyAsync_Async_Simple_False() + public async Task AnyAwaitAsync_Simple_False() { - var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AnyAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AnyAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.False(await res); } [Fact] - public async Task AnyAsync_Async_Throw_Source() + public async Task AnyAwaitAsync_Throw_Source() { var ex = new Exception("Bang!"); - var res = Throw(ex).AnyAsync(x => new ValueTask(x % 2 == 0)); + var res = Throw(ex).AnyAwaitAsync(x => new ValueTask(x % 2 == 0)); await AssertThrowsAsync(res, ex); } [Fact] - public async Task AnyAsync_Async_Throw_Selector() + public async Task AnyAwaitAsync_Throw_Selector() { var ex = new Exception("Bang!"); - var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AnyAsync(new Func>(x => { throw ex; })); + var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AnyAwaitAsync(new Func>(x => { throw ex; })); await AssertThrowsAsync(res, ex); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AnyAsync_AsyncCancel_Null() + public async Task AnyAwaitWithCancellationAsync_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(default, (x, ct) => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAwaitWithCancellationAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AnyAwaitWithCancellationAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task AnyAsync_AsyncCancel_Simple_True() + public async Task AnyAwaitWithCancellationAsync_Simple_True() { - var res = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable().AnyAsync((x, ct) => new ValueTask(x % 2 == 0)); + var res = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable().AnyAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 == 0)); Assert.True(await res); } [Fact] - public async Task AnyAsync_AsyncCancel_Simple_False() + public async Task AnyAwaitWithCancellationAsync_Simple_False() { - var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AnyAsync((x, ct) => new ValueTask(x % 2 != 0)); + var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AnyAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0)); Assert.False(await res); } [Fact] - public async Task AnyAsync_AsyncCancel_Throw_Source() + public async Task AnyAwaitWithCancellationAsync_Throw_Source() { var ex = new Exception("Bang!"); - var res = Throw(ex).AnyAsync((x, ct) => new ValueTask(x % 2 == 0)); + var res = Throw(ex).AnyAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 == 0)); await AssertThrowsAsync(res, ex); } [Fact] - public async Task AnyAsync_AsyncCancel_Throw_Selector() + public async Task AnyAwaitWithCancellationAsync_Throw_Selector() { var ex = new Exception("Bang!"); - var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AnyAsync(new Func>((x, ct) => { throw ex; })); + var res = new[] { 2, 8, 4 }.ToAsyncEnumerable().AnyAwaitWithCancellationAsync(new Func>((x, ct) => { throw ex; })); await AssertThrowsAsync(res, ex); } #endif diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.Generated.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.Generated.cs index 64d8f38d56..88017bb473 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.Generated.cs @@ -44,34 +44,34 @@ public async Task AverageAsync_Selector_Int32_Many() } [Fact] - public async Task AverageAsync_AsyncSelector_Int32_Empty() + public async Task AverageAwaitAsync_Selector_Int32_Empty() { var ys = new int[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync(x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitAsync(x => new ValueTask(x)).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelector_Int32_Many() + public async Task AverageAwaitAsync_Selector_Int32_Many() { var xs = new int[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Int32_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_Int32_Empty() { var ys = new int[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Int32_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_Int32_Many() { var xs = new int[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } #endif @@ -106,34 +106,34 @@ public async Task AverageAsync_Selector_Int32_Nullable_Many() } [Fact] - public async Task AverageAsync_AsyncSelector_Int32_Nullable_Empty() + public async Task AverageAwaitAsync_Selector_Int32_Nullable_Empty() { var ys = new int?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync(x => new ValueTask(x))); + Assert.Null(await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] - public async Task AverageAsync_AsyncSelector_Int32_Nullable_Many() + public async Task AverageAwaitAsync_Selector_Int32_Nullable_Many() { var xs = new int?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Int32_Nullable_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_Int32_Nullable_Empty() { var ys = new int?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Null(await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Int32_Nullable_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_Int32_Nullable_Many() { var xs = new int?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } #endif @@ -168,34 +168,34 @@ public async Task AverageAsync_Selector_Int64_Many() } [Fact] - public async Task AverageAsync_AsyncSelector_Int64_Empty() + public async Task AverageAwaitAsync_Selector_Int64_Empty() { var ys = new long[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync(x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitAsync(x => new ValueTask(x)).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelector_Int64_Many() + public async Task AverageAwaitAsync_Selector_Int64_Many() { var xs = new long[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Int64_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_Int64_Empty() { var ys = new long[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Int64_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_Int64_Many() { var xs = new long[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } #endif @@ -230,34 +230,34 @@ public async Task AverageAsync_Selector_Int64_Nullable_Many() } [Fact] - public async Task AverageAsync_AsyncSelector_Int64_Nullable_Empty() + public async Task AverageAwaitAsync_Selector_Int64_Nullable_Empty() { var ys = new long?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync(x => new ValueTask(x))); + Assert.Null(await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] - public async Task AverageAsync_AsyncSelector_Int64_Nullable_Many() + public async Task AverageAwaitAsync_Selector_Int64_Nullable_Many() { var xs = new long?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Int64_Nullable_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_Int64_Nullable_Empty() { var ys = new long?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Null(await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Int64_Nullable_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_Int64_Nullable_Many() { var xs = new long?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } #endif @@ -292,34 +292,34 @@ public async Task AverageAsync_Selector_Single_Many() } [Fact] - public async Task AverageAsync_AsyncSelector_Single_Empty() + public async Task AverageAwaitAsync_Selector_Single_Empty() { var ys = new float[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync(x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitAsync(x => new ValueTask(x)).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelector_Single_Many() + public async Task AverageAwaitAsync_Selector_Single_Many() { var xs = new float[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Single_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_Single_Empty() { var ys = new float[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Single_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_Single_Many() { var xs = new float[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } #endif @@ -354,34 +354,34 @@ public async Task AverageAsync_Selector_Single_Nullable_Many() } [Fact] - public async Task AverageAsync_AsyncSelector_Single_Nullable_Empty() + public async Task AverageAwaitAsync_Selector_Single_Nullable_Empty() { var ys = new float?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync(x => new ValueTask(x))); + Assert.Null(await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] - public async Task AverageAsync_AsyncSelector_Single_Nullable_Many() + public async Task AverageAwaitAsync_Selector_Single_Nullable_Many() { var xs = new float?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Single_Nullable_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_Single_Nullable_Empty() { var ys = new float?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Null(await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Single_Nullable_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_Single_Nullable_Many() { var xs = new float?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } #endif @@ -416,34 +416,34 @@ public async Task AverageAsync_Selector_Double_Many() } [Fact] - public async Task AverageAsync_AsyncSelector_Double_Empty() + public async Task AverageAwaitAsync_Selector_Double_Empty() { var ys = new double[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync(x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitAsync(x => new ValueTask(x)).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelector_Double_Many() + public async Task AverageAwaitAsync_Selector_Double_Many() { var xs = new double[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Double_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_Double_Empty() { var ys = new double[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Double_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_Double_Many() { var xs = new double[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } #endif @@ -478,34 +478,34 @@ public async Task AverageAsync_Selector_Double_Nullable_Many() } [Fact] - public async Task AverageAsync_AsyncSelector_Double_Nullable_Empty() + public async Task AverageAwaitAsync_Selector_Double_Nullable_Empty() { var ys = new double?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync(x => new ValueTask(x))); + Assert.Null(await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] - public async Task AverageAsync_AsyncSelector_Double_Nullable_Many() + public async Task AverageAwaitAsync_Selector_Double_Nullable_Many() { var xs = new double?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Double_Nullable_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_Double_Nullable_Empty() { var ys = new double?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Null(await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Double_Nullable_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_Double_Nullable_Many() { var xs = new double?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } #endif @@ -540,34 +540,34 @@ public async Task AverageAsync_Selector_Decimal_Many() } [Fact] - public async Task AverageAsync_AsyncSelector_Decimal_Empty() + public async Task AverageAwaitAsync_Selector_Decimal_Empty() { var ys = new decimal[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync(x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitAsync(x => new ValueTask(x)).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelector_Decimal_Many() + public async Task AverageAwaitAsync_Selector_Decimal_Many() { var xs = new decimal[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Decimal_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_Decimal_Empty() { var ys = new decimal[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Decimal_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_Decimal_Many() { var xs = new decimal[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } #endif @@ -602,34 +602,34 @@ public async Task AverageAsync_Selector_Decimal_Nullable_Many() } [Fact] - public async Task AverageAsync_AsyncSelector_Decimal_Nullable_Empty() + public async Task AverageAwaitAsync_Selector_Decimal_Nullable_Empty() { var ys = new decimal?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync(x => new ValueTask(x))); + Assert.Null(await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] - public async Task AverageAsync_AsyncSelector_Decimal_Nullable_Many() + public async Task AverageAwaitAsync_Selector_Decimal_Nullable_Many() { var xs = new decimal?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Decimal_Nullable_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_Decimal_Nullable_Empty() { var ys = new decimal?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Null(await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_Decimal_Nullable_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_Decimal_Nullable_Many() { var xs = new decimal?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None)); } #endif diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.Generated.tt b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.Generated.tt index 53eaefcdf6..067549d6a4 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.Generated.tt @@ -74,34 +74,34 @@ foreach (var t in types) } [Fact] - public async Task AverageAsync_AsyncSelector_<#=t.Name#>_Empty() + public async Task AverageAwaitAsync_Selector_<#=t.Name#>_Empty() { var ys = new <#=cs#>[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync(x => new ValueTask<<#=cs#>>(x)).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitAsync(x => new ValueTask<<#=cs#>>(x)).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelector_<#=t.Name#>_Many() + public async Task AverageAwaitAsync_Selector_<#=t.Name#>_Many() { var xs = new <#=cs#>[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask<<#=cs#>>(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask<<#=cs#>>(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_<#=t.Name#>_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_<#=t.Name#>_Empty() { var ys = new <#=cs#>[0].ToAsyncEnumerable(); - await Assert.ThrowsAsync(() => ys.AverageAsync((x, ct) => new ValueTask<<#=cs#>>(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>>(x), CancellationToken.None).AsTask()); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_<#=t.Name#>_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_<#=t.Name#>_Many() { var xs = new <#=cs#>[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask<<#=cs#>>(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>>(x), CancellationToken.None)); } #endif @@ -136,34 +136,34 @@ foreach (var t in types) } [Fact] - public async Task AverageAsync_AsyncSelector_<#=t.Name#>_Nullable_Empty() + public async Task AverageAwaitAsync_Selector_<#=t.Name#>_Nullable_Empty() { var ys = new <#=cs#>?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync(x => new ValueTask<<#=cs#>?>(x))); + Assert.Null(await ys.AverageAwaitAsync(x => new ValueTask<<#=cs#>?>(x))); } [Fact] - public async Task AverageAsync_AsyncSelector_<#=t.Name#>_Nullable_Many() + public async Task AverageAwaitAsync_Selector_<#=t.Name#>_Nullable_Many() { var xs = new <#=cs#>?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask<<#=cs#>?>(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask<<#=cs#>?>(x))); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_<#=t.Name#>_Nullable_Empty() + public async Task AverageAwaitWithCancellationAsync_Selector_<#=t.Name#>_Nullable_Empty() { var ys = new <#=cs#>?[0].ToAsyncEnumerable(); - Assert.Null(await ys.AverageAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None)); + Assert.Null(await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None)); } [Fact] - public async Task AverageAsync_AsyncSelectorWithCancellation_<#=t.Name#>_Nullable_Many() + public async Task AverageAwaitWithCancellationAsync_Selector_<#=t.Name#>_Nullable_Many() { var xs = new <#=cs#>?[] { 2, 3, 5, 7, 11, 13, 17, 19 }; var ys = xs.ToAsyncEnumerable(); - Assert.Equal(xs.Average(), await ys.AverageAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None)); + Assert.Equal(xs.Average(), await ys.AverageAwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None)); } #endif diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.cs index ccd7c44fa3..f6154e421a 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Average.cs @@ -79,7 +79,7 @@ public async Task Average_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => x, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => x, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); @@ -92,76 +92,76 @@ public async Task Average_Null() // Average(IAE, Func>) - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); // Average(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #if !NO_DEEP_CANCELLATION // Average(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.AverageAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #endif } @@ -172,7 +172,7 @@ public async Task Average1() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Average(), await ys.AverageAsync()); Assert.Equal(xs.Average(), await ys.AverageAsync(x => x)); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -182,7 +182,7 @@ public async Task Average2() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Average(), await ys.AverageAsync()); Assert.Equal(xs.Average(), await ys.AverageAsync(x => x)); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -192,7 +192,7 @@ public async Task Average3() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Average(), await ys.AverageAsync()); Assert.Equal(xs.Average(), await ys.AverageAsync(x => x)); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -202,7 +202,7 @@ public async Task Average4() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Average(), await ys.AverageAsync()); Assert.Equal(xs.Average(), await ys.AverageAsync(x => x)); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -212,7 +212,7 @@ public async Task Average5() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Average(), await ys.AverageAsync()); Assert.Equal(xs.Average(), await ys.AverageAsync(x => x)); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -222,7 +222,7 @@ public async Task Average6() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Average(), await ys.AverageAsync()); Assert.Equal(xs.Average(), await ys.AverageAsync(x => x)); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -232,7 +232,7 @@ public async Task Average7() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Average(), await ys.AverageAsync()); Assert.Equal(xs.Average(), await ys.AverageAsync(x => x)); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -242,7 +242,7 @@ public async Task Average8() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Average(), await ys.AverageAsync()); Assert.Equal(xs.Average(), await ys.AverageAsync(x => x)); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -252,7 +252,7 @@ public async Task Average9() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Average(), await ys.AverageAsync()); Assert.Equal(xs.Average(), await ys.AverageAsync(x => x)); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -262,7 +262,7 @@ public async Task Average10() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Average(), await ys.AverageAsync()); Assert.Equal(xs.Average(), await ys.AverageAsync(x => x)); - Assert.Equal(xs.Average(), await ys.AverageAsync(x => new ValueTask(x))); + Assert.Equal(xs.Average(), await ys.AverageAwaitAsync(x => new ValueTask(x))); } [Fact] diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Count.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Count.cs index 207ebb3e28..e432a727ee 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Count.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Count.cs @@ -40,7 +40,7 @@ public async Task CountAsync_Predicate_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(Return42, default(Func)).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(default, x => true, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(Return42, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] @@ -66,68 +66,68 @@ public async Task CountAsync_Predicate_Throws_Source() } [Fact] - public async Task CountAsync_AsyncPredicate_Null() + public async Task CountAwaitAsync_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(default, x => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.CountAwaitAsync(default, x => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.CountAwaitAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.CountAwaitAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.CountAwaitAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task CountAsync_AsyncPredicate() + public async Task CountAwaitAsync() { - Assert.Equal(0, await new int[0].ToAsyncEnumerable().CountAsync(x => new ValueTask(x < 3))); - Assert.Equal(2, await new[] { 1, 2, 3 }.ToAsyncEnumerable().CountAsync(x => new ValueTask(x < 3))); + Assert.Equal(0, await new int[0].ToAsyncEnumerable().CountAwaitAsync(x => new ValueTask(x < 3))); + Assert.Equal(2, await new[] { 1, 2, 3 }.ToAsyncEnumerable().CountAwaitAsync(x => new ValueTask(x < 3))); } [Fact] - public async Task CountAsync_AsyncPredicate_Throws_Predicate() + public async Task CountAwaitAsync_Throws_Predicate() { var ex = new Exception("Bang!"); - var ys = new[] { 1, 2, 3 }.ToAsyncEnumerable().CountAsync(new Func>(x => { throw ex; })); + var ys = new[] { 1, 2, 3 }.ToAsyncEnumerable().CountAwaitAsync(new Func>(x => { throw ex; })); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task CountAsync_AsyncPredicate_Throws_Source() + public async Task CountAwaitAsync_Throws_Source() { var ex = new Exception("Bang!"); - await AssertThrowsAsync(Throw(ex).CountAsync(x => new ValueTask(x < 3)), ex); + await AssertThrowsAsync(Throw(ex).CountAwaitAsync(x => new ValueTask(x < 3)), ex); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task CountAsync_AsyncPredicateCancel_Null() + public async Task CountAwaitWithCancellationAsync_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(default, (x, ct) => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.CountAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.CountAwaitWithCancellationAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.CountAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.CountAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.CountAwaitWithCancellationAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task CountAsync_AsyncPredicateCancel() + public async Task CountAwaitWithCancellationAsync() { - Assert.Equal(0, await new int[0].ToAsyncEnumerable().CountAsync((x, ct) => new ValueTask(x < 3))); - Assert.Equal(2, await new[] { 1, 2, 3 }.ToAsyncEnumerable().CountAsync((x, ct) => new ValueTask(x < 3))); + Assert.Equal(0, await new int[0].ToAsyncEnumerable().CountAwaitWithCancellationAsync((x, ct) => new ValueTask(x < 3))); + Assert.Equal(2, await new[] { 1, 2, 3 }.ToAsyncEnumerable().CountAwaitWithCancellationAsync((x, ct) => new ValueTask(x < 3))); } [Fact] - public async Task CountAsync_AsyncPredicateCancel_Throws_Predicate() + public async Task CountAwaitWithCancellationAsync_Throws_Predicate() { var ex = new Exception("Bang!"); - var ys = new[] { 1, 2, 3 }.ToAsyncEnumerable().CountAsync(new Func>((x, ct) => { throw ex; })); + var ys = new[] { 1, 2, 3 }.ToAsyncEnumerable().CountAwaitWithCancellationAsync(new Func>((x, ct) => { throw ex; })); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task CountAsync_AsyncPredicateCancel_Throws_Source() + public async Task CountAwaitWithCancellationAsync_Throws_Source() { var ex = new Exception("Bang!"); - await AssertThrowsAsync(Throw(ex).CountAsync((x, ct) => new ValueTask(x < 3)), ex); + await AssertThrowsAsync(Throw(ex).CountAwaitWithCancellationAsync((x, ct) => new ValueTask(x < 3)), ex); } #endif } diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/First.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/First.cs index 492499282f..40c047739e 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/First.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/First.cs @@ -23,17 +23,17 @@ public async Task FirstAsync_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAsync(Return42, default(Func)).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAsync(default, x => true, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAsync(Return42, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAsync(Return42, default, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAsync(default, x => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAwaitAsync(default, x => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAwaitAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAwaitAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAwaitAsync(Return42, default, CancellationToken.None).AsTask()); #if !NO_DEEP_CANCELLATION - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstAwaitWithCancellationAsync(Return42, default, CancellationToken.None).AsTask()); #endif } @@ -173,159 +173,159 @@ public async Task FirstAsync_Predicate_PredicateThrows() } [Fact] - public async Task FirstAsync_AsyncPredicate_Empty() + public async Task FirstAwaitAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().FirstAsync(x => new ValueTask(true)); + var res = AsyncEnumerable.Empty().FirstAwaitAsync(x => new ValueTask(true)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task FirstAsync_AsyncPredicate_Throw() + public async Task FirstAwaitAsync_Predicate_Throw() { var ex = new Exception("Bang!"); - var res = Throw(ex).FirstAsync(x => new ValueTask(true)); + var res = Throw(ex).FirstAwaitAsync(x => new ValueTask(true)); await AssertThrowsAsync(res, ex); } [Fact] - public async Task FirstAsync_AsyncPredicate_Single_None() + public async Task FirstAwaitAsync_Predicate_Single_None() { - var res = Return42.FirstAsync(x => new ValueTask(x % 2 != 0)); + var res = Return42.FirstAwaitAsync(x => new ValueTask(x % 2 != 0)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task FirstAsync_AsyncPredicate_Many_IList_None() + public async Task FirstAwaitAsync_Predicate_Many_IList_None() { - var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().FirstAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().FirstAwaitAsync(x => new ValueTask(x % 2 != 0)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task FirstAsync_AsyncPredicate_Many_None() + public async Task FirstAwaitAsync_Predicate_Many_None() { - var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().Select(x => x).FirstAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().Select(x => x).FirstAwaitAsync(x => new ValueTask(x % 2 != 0)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task FirstAsync_AsyncPredicate_Single_Pass() + public async Task FirstAwaitAsync_Predicate_Single_Pass() { - var res = Return42.FirstAsync(x => new ValueTask(x % 2 == 0)); + var res = Return42.FirstAwaitAsync(x => new ValueTask(x % 2 == 0)); Assert.Equal(42, await res); } [Fact] - public async Task FirstAsync_AsyncPredicate_Many_IList_Pass1() + public async Task FirstAwaitAsync_Predicate_Many_IList_Pass1() { - var res = new[] { 42, 43, 44 }.ToAsyncEnumerable().FirstAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 43, 44 }.ToAsyncEnumerable().FirstAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(43, await res); } [Fact] - public async Task FirstAsync_AsyncPredicate_Many_IList_Pass2() + public async Task FirstAwaitAsync_Predicate_Many_IList_Pass2() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().FirstAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().FirstAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task FirstAsync_AsyncPredicate_Many_Pass1() + public async Task FirstAwaitAsync_Predicate_Many_Pass1() { - var res = new[] { 42, 43, 44 }.Select(x => x).ToAsyncEnumerable().FirstAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 43, 44 }.Select(x => x).ToAsyncEnumerable().FirstAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(43, await res); } [Fact] - public async Task FirstAsync_AsyncPredicate_Many_Pass2() + public async Task FirstAwaitAsync_Predicate_Many_Pass2() { - var res = new[] { 42, 45, 90 }.Select(x => x).ToAsyncEnumerable().FirstAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.Select(x => x).ToAsyncEnumerable().FirstAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task FirstAsync_AsyncPredicate_AsyncPredicateThrows() + public async Task FirstAwaitAsync_Predicate_AsyncPredicateThrows() { - var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().FirstAsync(x => new ValueTask(1 / x > 0)); + var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().FirstAwaitAsync(x => new ValueTask(1 / x > 0)); await AssertThrowsAsync(res.AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task FirstAsync_AsyncPredicateWithCancellation_Empty() + public async Task FirstAwaitWithCancellationAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().FirstAsync((x, ct) => new ValueTask(true), CancellationToken.None); + var res = AsyncEnumerable.Empty().FirstAwaitWithCancellationAsync((x, ct) => new ValueTask(true), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task FirstAsync_AsyncPredicateWithCancellation_Throw() + public async Task FirstAwaitWithCancellationAsync_Predicate_Throw() { var ex = new Exception("Bang!"); - var res = Throw(ex).FirstAsync((x, ct) => new ValueTask(true), CancellationToken.None); + var res = Throw(ex).FirstAwaitWithCancellationAsync((x, ct) => new ValueTask(true), CancellationToken.None); await AssertThrowsAsync(res, ex); } [Fact] - public async Task FirstAsync_AsyncPredicateWithCancellation_Single_None() + public async Task FirstAwaitWithCancellationAsync_Predicate_Single_None() { - var res = Return42.FirstAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = Return42.FirstAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task FirstAsync_AsyncPredicateWithCancellation_Many_IList_None() + public async Task FirstAwaitWithCancellationAsync_Predicate_Many_IList_None() { - var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().FirstAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().FirstAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task FirstAsync_AsyncPredicateWithCancellation_Many_None() + public async Task FirstAwaitWithCancellationAsync_Predicate_Many_None() { - var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().Select((x, ct) => x).FirstAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().Select((x, ct) => x).FirstAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task FirstAsync_AsyncPredicateWithCancellation_Single_Pass() + public async Task FirstAwaitWithCancellationAsync_Predicate_Single_Pass() { - var res = Return42.FirstAsync((x, ct) => new ValueTask(x % 2 == 0), CancellationToken.None); + var res = Return42.FirstAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 == 0), CancellationToken.None); Assert.Equal(42, await res); } [Fact] - public async Task FirstAsync_AsyncPredicateWithCancellation_Many_IList_Pass1() + public async Task FirstAwaitWithCancellationAsync_Predicate_Many_IList_Pass1() { - var res = new[] { 42, 43, 44 }.ToAsyncEnumerable().FirstAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 43, 44 }.ToAsyncEnumerable().FirstAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(43, await res); } [Fact] - public async Task FirstAsync_AsyncPredicateWithCancellation_Many_IList_Pass2() + public async Task FirstAwaitWithCancellationAsync_Predicate_Many_IList_Pass2() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().FirstAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().FirstAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task FirstAsync_AsyncPredicateWithCancellation_Many_Pass1() + public async Task FirstAwaitWithCancellationAsync_Predicate_Many_Pass1() { - var res = new[] { 42, 43, 44 }.Select((x, ct) => x).ToAsyncEnumerable().FirstAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 43, 44 }.Select((x, ct) => x).ToAsyncEnumerable().FirstAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(43, await res); } [Fact] - public async Task FirstAsync_AsyncPredicateWithCancellation_Many_Pass2() + public async Task FirstAwaitWithCancellationAsync_Predicate_Many_Pass2() { - var res = new[] { 42, 45, 90 }.Select((x, ct) => x).ToAsyncEnumerable().FirstAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 45, 90 }.Select((x, ct) => x).ToAsyncEnumerable().FirstAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task FirstAsync_AsyncPredicateWithCancellation_AsyncPredicateWithCancellationThrows() + public async Task FirstAwaitWithCancellationAsync_Predicate_AsyncPredicateWithCancellationThrows() { - var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().FirstAsync((x, ct) => new ValueTask(1 / x > 0), CancellationToken.None); + var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().FirstAwaitWithCancellationAsync((x, ct) => new ValueTask(1 / x > 0), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } #endif diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/FirstOrDefault.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/FirstOrDefault.cs index 26e4fa0f7d..5af5877bab 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/FirstOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/FirstOrDefault.cs @@ -23,17 +23,17 @@ public async Task FirstOrDefault_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAsync(Return42, default(Func)).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAsync(default, x => true, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAsync(Return42, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAsync(Return42, default, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAsync(default, x => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAwaitAsync(default, x => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAwaitAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAwaitAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAwaitAsync(Return42, default, CancellationToken.None).AsTask()); #if !NO_DEEP_CANCELLATION - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.FirstOrDefaultAwaitWithCancellationAsync(Return42, default, CancellationToken.None).AsTask()); #endif } @@ -174,159 +174,159 @@ public async Task FirstOrDefaultAsync_Predicate_PredicateThrows() } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicate_Empty() + public async Task FirstOrDefaultAwaitAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().FirstOrDefaultAsync(x => new ValueTask(true)); + var res = AsyncEnumerable.Empty().FirstOrDefaultAwaitAsync(x => new ValueTask(true)); Assert.Equal(0, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicate_Throw() + public async Task FirstOrDefaultAwaitAsync_Predicate_Throw() { var ex = new Exception("Bang!"); - var res = Throw(ex).FirstOrDefaultAsync(x => new ValueTask(true)); + var res = Throw(ex).FirstOrDefaultAwaitAsync(x => new ValueTask(true)); await AssertThrowsAsync(res, ex); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicate_Single_None() + public async Task FirstOrDefaultAwaitAsync_Predicate_Single_None() { - var res = Return42.FirstOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = Return42.FirstOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(0, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicate_Many_IList_None() + public async Task FirstOrDefaultAwaitAsync_Predicate_Many_IList_None() { - var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().FirstOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().FirstOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(0, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicate_Many_None() + public async Task FirstOrDefaultAwaitAsync_Predicate_Many_None() { - var res = new[] { 40, 42, 44 }.Select(x => x).ToAsyncEnumerable().FirstOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 40, 42, 44 }.Select(x => x).ToAsyncEnumerable().FirstOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(0, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicate_Single_Pass() + public async Task FirstOrDefaultAwaitAsync_Predicate_Single_Pass() { - var res = Return42.FirstOrDefaultAsync(x => new ValueTask(x % 2 == 0)); + var res = Return42.FirstOrDefaultAwaitAsync(x => new ValueTask(x % 2 == 0)); Assert.Equal(42, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicate_Many_IList_Pass1() + public async Task FirstOrDefaultAwaitAsync_Predicate_Many_IList_Pass1() { - var res = new[] { 42, 43, 44 }.ToAsyncEnumerable().FirstOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 43, 44 }.ToAsyncEnumerable().FirstOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(43, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicate_Many_IList_Pass2() + public async Task FirstOrDefaultAwaitAsync_Predicate_Many_IList_Pass2() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().FirstOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().FirstOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicate_Many_Pass1() + public async Task FirstOrDefaultAwaitAsync_Predicate_Many_Pass1() { - var res = new[] { 42, 43, 44 }.Select(x => x).ToAsyncEnumerable().FirstOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 43, 44 }.Select(x => x).ToAsyncEnumerable().FirstOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(43, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicate_Many_Pass2() + public async Task FirstOrDefaultAwaitAsync_Predicate_Many_Pass2() { - var res = new[] { 42, 45, 90 }.Select(x => x).ToAsyncEnumerable().FirstOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.Select(x => x).ToAsyncEnumerable().FirstOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicate_AsyncPredicateThrows() + public async Task FirstOrDefaultAwaitAsync_Predicate_AsyncPredicateThrows() { - var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().FirstOrDefaultAsync(x => new ValueTask(1 / x > 0)); + var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().FirstOrDefaultAwaitAsync(x => new ValueTask(1 / x > 0)); await AssertThrowsAsync(res.AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicateWithCancellation_Empty() + public async Task FirstOrDefaultAwaitWithCancellationAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().FirstOrDefaultAsync((x, ct) => new ValueTask(true), CancellationToken.None); + var res = AsyncEnumerable.Empty().FirstOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(true), CancellationToken.None); Assert.Equal(0, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicateWithCancellation_Throw() + public async Task FirstOrDefaultAwaitWithCancellationAsync_Predicate_Throw() { var ex = new Exception("Bang!"); - var res = Throw(ex).FirstOrDefaultAsync((x, ct) => new ValueTask(true), CancellationToken.None); + var res = Throw(ex).FirstOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(true), CancellationToken.None); await AssertThrowsAsync(res, ex); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicateWithCancellation_Single_None() + public async Task FirstOrDefaultAwaitWithCancellationAsync_Predicate_Single_None() { - var res = Return42.FirstOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = Return42.FirstOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(0, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicateWithCancellation_Many_IList_None() + public async Task FirstOrDefaultAwaitWithCancellationAsync_Predicate_Many_IList_None() { - var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().FirstOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().FirstOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(0, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicateWithCancellation_Many_None() + public async Task FirstOrDefaultAwaitWithCancellationAsync_Predicate_Many_None() { - var res = new[] { 40, 42, 44 }.Select((x, ct) => x).ToAsyncEnumerable().FirstOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 40, 42, 44 }.Select((x, ct) => x).ToAsyncEnumerable().FirstOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(0, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicateWithCancellation_Single_Pass() + public async Task FirstOrDefaultAwaitWithCancellationAsync_Predicate_Single_Pass() { - var res = Return42.FirstOrDefaultAsync((x, ct) => new ValueTask(x % 2 == 0), CancellationToken.None); + var res = Return42.FirstOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 == 0), CancellationToken.None); Assert.Equal(42, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicateWithCancellation_Many_IList_Pass1() + public async Task FirstOrDefaultAwaitWithCancellationAsync_Predicate_Many_IList_Pass1() { - var res = new[] { 42, 43, 44 }.ToAsyncEnumerable().FirstOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 43, 44 }.ToAsyncEnumerable().FirstOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(43, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicateWithCancellation_Many_IList_Pass2() + public async Task FirstOrDefaultAwaitWithCancellationAsync_Predicate_Many_IList_Pass2() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().FirstOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().FirstOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicateWithCancellation_Many_Pass1() + public async Task FirstOrDefaultAwaitWithCancellationAsync_Predicate_Many_Pass1() { - var res = new[] { 42, 43, 44 }.Select((x, ct) => x).ToAsyncEnumerable().FirstOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 43, 44 }.Select((x, ct) => x).ToAsyncEnumerable().FirstOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(43, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicateWithCancellation_Many_Pass2() + public async Task FirstOrDefaultAwaitWithCancellationAsync_Predicate_Many_Pass2() { - var res = new[] { 42, 45, 90 }.Select((x, ct) => x).ToAsyncEnumerable().FirstOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 45, 90 }.Select((x, ct) => x).ToAsyncEnumerable().FirstOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task FirstOrDefaultAsync_AsyncPredicateWithCancellation_AsyncPredicateWithCancellationThrows() + public async Task FirstOrDefaultAwaitWithCancellationAsync_Predicate_AsyncPredicateWithCancellationThrows() { - var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().FirstOrDefaultAsync((x, ct) => new ValueTask(1 / x > 0), CancellationToken.None); + var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().FirstOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(1 / x > 0), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } #endif diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ForEachAsync.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ForEachAsync.cs index 52e9d8a689..e15f4707cc 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ForEachAsync.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ForEachAsync.cs @@ -14,7 +14,7 @@ namespace Tests public class ForEachAsync : AsyncEnumerableTests { [Fact] - public async Task ForEachAsync_Sync_Null() + public async Task ForEachAsync_Null() { await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(default, x => { })); await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(Return42, default(Action))); @@ -28,7 +28,7 @@ public async Task ForEachAsync_Sync_Null() } [Fact] - public async Task ForEachAsync_Sync_Simple() + public async Task ForEachAsync_Simple() { var sum = 0; var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); @@ -38,7 +38,7 @@ public async Task ForEachAsync_Sync_Simple() } [Fact] - public async Task ForEachAsync_Sync_Indexed() + public async Task ForEachAsync_Indexed() { var sum = 0; var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); @@ -48,7 +48,7 @@ public async Task ForEachAsync_Sync_Indexed() } [Fact] - public async Task ForEachAsync_Sync_Throws_Action() + public async Task ForEachAsync_Throws_Action() { var ex = new Exception("Bang"); var xs = Throw(ex); @@ -57,7 +57,7 @@ public async Task ForEachAsync_Sync_Throws_Action() } [Fact] - public async Task ForEachAsync_Sync_Indexed_Throws_Action() + public async Task ForEachAsync_Indexed_Throws_Action() { var ex = new Exception("Bang"); var xs = Throw(ex); @@ -65,44 +65,42 @@ public async Task ForEachAsync_Sync_Indexed_Throws_Action() await AssertThrowsAsync(xs.ForEachAsync((int x, int i) => { throw ex; }), ex); } - // REVIEW: Overloads with (T, int) and (T, CancellationToken) cause ambiguity. - [Fact] - public async Task ForEachAsync_Async_Null() + public async Task ForEachAwaitAsync_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(default, x => Task.CompletedTask)); - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(Return42, default(Func))); - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(default, (x, i) => Task.CompletedTask)); - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(Return42, default(Func))); - - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(default, x => Task.CompletedTask, CancellationToken.None)); - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(Return42, default(Func), CancellationToken.None)); - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(default, (int x, int i) => Task.CompletedTask, CancellationToken.None)); - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(Return42, default(Func), CancellationToken.None)); + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitAsync(default, x => Task.CompletedTask)); + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitAsync(Return42, default(Func))); + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitAsync(default, (x, i) => Task.CompletedTask)); + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitAsync(Return42, default(Func))); + + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitAsync(default, x => Task.CompletedTask, CancellationToken.None)); + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitAsync(Return42, default(Func), CancellationToken.None)); + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitAsync(default, (int x, int i) => Task.CompletedTask, CancellationToken.None)); + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitAsync(Return42, default(Func), CancellationToken.None)); } [Fact] - public async Task ForEachAsync_Async_Simple() + public async Task ForEachAwaitAsync_Simple() { var sum = 0; var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - await xs.ForEachAsync(x => { sum += x; return Task.CompletedTask; }); + await xs.ForEachAwaitAsync(x => { sum += x; return Task.CompletedTask; }); Assert.Equal(10, sum); } [Fact] - public async Task ForEachAsync_Async_Indexed() + public async Task ForEachAwaitAsync_Indexed() { var sum = 0; var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - await xs.ForEachAsync((x, i) => { sum += x * i; return Task.CompletedTask; }); + await xs.ForEachAwaitAsync((x, i) => { sum += x * i; return Task.CompletedTask; }); Assert.Equal(1 * 0 + 2 * 1 + 3 * 2 + 4 * 3, sum); } [Fact] - public async Task ForEachAsync_Async_Throws_Action() + public async Task ForEachAwaitAsync_Throws_Action() { var ex = new Exception("Bang"); var xs = Throw(ex); @@ -111,7 +109,7 @@ public async Task ForEachAsync_Async_Throws_Action() } [Fact] - public async Task ForEachAsync_Async_Indexed_Throws_Action() + public async Task ForEachAwaitAsync_Indexed_Throws_Action() { var ex = new Exception("Bang"); var xs = Throw(ex); @@ -120,50 +118,50 @@ public async Task ForEachAsync_Async_Indexed_Throws_Action() } [Fact] - public async Task ForEachAsync_Cancel_Async_Cancel_Null() + public async Task ForEachAwaitWithCancellationAsync_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(default, (int x, CancellationToken ct) => Task.CompletedTask, CancellationToken.None)); - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(Return42, default(Func), CancellationToken.None)); - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(default, (x, i, ct) => Task.CompletedTask, CancellationToken.None)); - await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAsync(Return42, default(Func), CancellationToken.None)); + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitWithCancellationAsync(default, (int x, CancellationToken ct) => Task.CompletedTask, CancellationToken.None)); + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitWithCancellationAsync(Return42, default(Func), CancellationToken.None)); + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitWithCancellationAsync(default, (x, i, ct) => Task.CompletedTask, CancellationToken.None)); + await Assert.ThrowsAsync(() => AsyncEnumerable.ForEachAwaitWithCancellationAsync(Return42, default(Func), CancellationToken.None)); } [Fact] - public async Task ForEachAsync_Cancel_Async_Cancel_Simple() + public async Task ForEachAwaitWithCancellationAsync_Simple() { var sum = 0; var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - await xs.ForEachAsync((int x, CancellationToken ct) => { sum += x; return Task.CompletedTask; }, CancellationToken.None); + await xs.ForEachAwaitWithCancellationAsync((int x, CancellationToken ct) => { sum += x; return Task.CompletedTask; }, CancellationToken.None); Assert.Equal(10, sum); } [Fact] - public async Task ForEachAsync_Cancel_Async_Cancel_Indexed() + public async Task ForEachAwaitWithCancellationAsync_Indexed() { var sum = 0; var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - await xs.ForEachAsync((x, i, ct) => { sum += x * i; return Task.CompletedTask; }, CancellationToken.None); + await xs.ForEachAwaitWithCancellationAsync((x, i, ct) => { sum += x * i; return Task.CompletedTask; }, CancellationToken.None); Assert.Equal(1 * 0 + 2 * 1 + 3 * 2 + 4 * 3, sum); } [Fact] - public async Task ForEachAsync_Cancel_Async_Cancel_Throws_Action() + public async Task ForEachAwaitWithCancellationAsync_Throws_Action() { var ex = new Exception("Bang"); var xs = Throw(ex); - await AssertThrowsAsync(xs.ForEachAsync((int x, CancellationToken ct) => Task.FromException(ex), CancellationToken.None), ex); + await AssertThrowsAsync(xs.ForEachAwaitWithCancellationAsync((int x, CancellationToken ct) => Task.FromException(ex), CancellationToken.None), ex); } [Fact] - public async Task ForEachAsync_Cancel_Async_Cancel_Indexed_Throws_Action() + public async Task ForEachAwaitWithCancellationAsync_Indexed_Throws_Action() { var ex = new Exception("Bang"); var xs = Throw(ex); - await AssertThrowsAsync(xs.ForEachAsync((x, i, ct) => Task.FromException(ex), CancellationToken.None), ex); + await AssertThrowsAsync(xs.ForEachAwaitWithCancellationAsync((x, i, ct) => Task.FromException(ex), CancellationToken.None), ex); } } } diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.Generated.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.Generated.cs index c68f39ef23..605cfcac77 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.Generated.cs @@ -184,8 +184,8 @@ public async Task KeySelector_ElementSelector_ResultSelector_Sync_Comparer_All() [Fact] public void KeySelector_Async_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, default(Func>))); } [Fact] @@ -195,7 +195,7 @@ public async Task KeySelector_Async_All() var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name); - var resA = methodsA.GroupBy(m => new ValueTask(m.Name)); + var resA = methodsA.GroupByAwait(m => new ValueTask(m.Name)); await Groups_AssertCore(resS, resA); } @@ -203,8 +203,8 @@ public async Task KeySelector_Async_All() [Fact] public void KeySelector_Async_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, default(Func>), EqualityComparer.Default)); } [Fact] @@ -216,7 +216,7 @@ public async Task KeySelector_Async_Comparer_All() var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, eq); - var resA = methodsA.GroupBy(m => new ValueTask(m.Name), eq); + var resA = methodsA.GroupByAwait(m => new ValueTask(m.Name), eq); await Groups_AssertCore(resS, resA); } @@ -224,9 +224,9 @@ public async Task KeySelector_Async_Comparer_All() [Fact] public void KeySelector_ElementSelector_Async_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x), (int x) => new ValueTask(x))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (int x) => new ValueTask(x))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, (int x) => new ValueTask(x), default(Func>))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x), (int x) => new ValueTask(x))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, default(Func>), (int x) => new ValueTask(x))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, (int x) => new ValueTask(x), default(Func>))); } [Fact] @@ -236,7 +236,7 @@ public async Task KeySelector_ElementSelector_Async_All() var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper()); - var resA = methodsA.GroupBy(m => new ValueTask(m.Name), m => new ValueTask(m.Name.ToUpper())); + var resA = methodsA.GroupByAwait(m => new ValueTask(m.Name), m => new ValueTask(m.Name.ToUpper())); await Groups_AssertCore(resS, resA); } @@ -244,9 +244,9 @@ public async Task KeySelector_ElementSelector_Async_All() [Fact] public void KeySelector_ElementSelector_Async_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x), (int x) => new ValueTask(x), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (int x) => new ValueTask(x), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x), default(Func>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x), (int x) => new ValueTask(x), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, default(Func>), (int x) => new ValueTask(x), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x), default(Func>), EqualityComparer.Default)); } [Fact] @@ -258,7 +258,7 @@ public async Task KeySelector_ElementSelector_Async_Comparer_All() var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper(), eq); - var resA = methodsA.GroupBy(m => new ValueTask(m.Name), m => new ValueTask(m.Name.ToUpper()), eq); + var resA = methodsA.GroupByAwait(m => new ValueTask(m.Name), m => new ValueTask(m.Name.ToUpper()), eq); await Groups_AssertCore(resS, resA); } @@ -266,9 +266,9 @@ public async Task KeySelector_ElementSelector_Async_Comparer_All() [Fact] public void KeySelector_ResultSelector_Async_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x), (k, g) => new ValueTask(0))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (k, g) => new ValueTask(0))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, (int x) => new ValueTask(x), default(Func, ValueTask>))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x), (k, g) => new ValueTask(0))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, default(Func>), (k, g) => new ValueTask(0))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, (int x) => new ValueTask(x), default(Func, ValueTask>))); } [Fact] @@ -278,7 +278,7 @@ public async Task KeySelector_ResultSelector_Async_All() var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name, (k, g) => k + " - " + g.Count()); - var resA = methodsA.GroupBy(m => new ValueTask(m.Name), async (k, g) => k + " - " + await g.CountAsync()); // REVIEW: Ambiguity + var resA = methodsA.GroupByAwait(m => new ValueTask(m.Name), async (k, g) => k + " - " + await g.CountAsync()); await Group_Result_AssertCore(resS, resA); } @@ -286,9 +286,9 @@ public async Task KeySelector_ResultSelector_Async_All() [Fact] public void KeySelector_ResultSelector_Async_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x), (k, g) => new ValueTask(0), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (k, g) => new ValueTask(0), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x), default(Func, ValueTask>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x), (k, g) => new ValueTask(0), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, default(Func>), (k, g) => new ValueTask(0), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x), default(Func, ValueTask>), EqualityComparer.Default)); } [Fact] @@ -300,7 +300,7 @@ public async Task KeySelector_ResultSelector_Async_Comparer_All() var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, (k, g) => k + " - " + g.Count(), eq); - var resA = methodsA.GroupBy(m => new ValueTask(m.Name), async (k, g) => k + " - " + await g.CountAsync(), eq); + var resA = methodsA.GroupByAwait(m => new ValueTask(m.Name), async (k, g) => k + " - " + await g.CountAsync(), eq); await Group_Result_AssertCore(resS, resA); } @@ -308,10 +308,10 @@ public async Task KeySelector_ResultSelector_Async_Comparer_All() [Fact] public void KeySelector_ElementSelector_ResultSelector_Async_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x), (int x) => new ValueTask(x), (k, g) => new ValueTask(0))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (int x) => new ValueTask(x), (k, g) => new ValueTask(0))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, (int x) => new ValueTask(x), default(Func>), (k, g) => new ValueTask(0))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, (int x) => new ValueTask(x), (int x) => new ValueTask(x), default(Func, ValueTask>))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x), (int x) => new ValueTask(x), (k, g) => new ValueTask(0))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, default(Func>), (int x) => new ValueTask(x), (k, g) => new ValueTask(0))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, (int x) => new ValueTask(x), default(Func>), (k, g) => new ValueTask(0))); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, (int x) => new ValueTask(x), (int x) => new ValueTask(x), default(Func, ValueTask>))); } [Fact] @@ -321,7 +321,7 @@ public async Task KeySelector_ElementSelector_ResultSelector_Async_All() var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper(), (k, g) => k + " - " + g.Count()); - var resA = methodsA.GroupBy(m => new ValueTask(m.Name), m => new ValueTask(m.Name.ToUpper()), async (k, g) => k + " - " + await g.CountAsync()); // REVIEW: Ambiguity + var resA = methodsA.GroupByAwait(m => new ValueTask(m.Name), m => new ValueTask(m.Name.ToUpper()), async (k, g) => k + " - " + await g.CountAsync()); await Group_Result_AssertCore(resS, resA); } @@ -329,10 +329,10 @@ public async Task KeySelector_ElementSelector_ResultSelector_Async_All() [Fact] public void KeySelector_ElementSelector_ResultSelector_Async_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x), (int x) => new ValueTask(x), (k, g) => new ValueTask(0), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (int x) => new ValueTask(x), (k, g) => new ValueTask(0), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x), default(Func>), (k, g) => new ValueTask(0), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x) => new ValueTask(x), (int x) => new ValueTask(x), default(Func, ValueTask>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x), (int x) => new ValueTask(x), (k, g) => new ValueTask(0), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(Return42, default(Func>), (int x) => new ValueTask(x), (k, g) => new ValueTask(0), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x), default(Func>), (k, g) => new ValueTask(0), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwait(default(IAsyncEnumerable), (int x) => new ValueTask(x), (int x) => new ValueTask(x), default(Func, ValueTask>), EqualityComparer.Default)); } [Fact] @@ -344,7 +344,7 @@ public async Task KeySelector_ElementSelector_ResultSelector_Async_Comparer_All( var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper(), (k, g) => k + " - " + g.Count(), eq); - var resA = methodsA.GroupBy(m => new ValueTask(m.Name), m => new ValueTask(m.Name.ToUpper()), async (k, g) => k + " - " + await g.CountAsync(), eq); + var resA = methodsA.GroupByAwait(m => new ValueTask(m.Name), m => new ValueTask(m.Name.ToUpper()), async (k, g) => k + " - " + await g.CountAsync(), eq); await Group_Result_AssertCore(resS, resA); } @@ -353,8 +353,8 @@ public async Task KeySelector_ElementSelector_ResultSelector_Async_Comparer_All( [Fact] public void KeySelector_Async_Cancel_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, default(Func>))); } [Fact] @@ -364,7 +364,7 @@ public async Task KeySelector_Async_Cancel_All() var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name); - var resA = methodsA.GroupBy((m, ct) => new ValueTask(m.Name)); + var resA = methodsA.GroupByAwaitWithCancellation((m, ct) => new ValueTask(m.Name)); await Groups_AssertCore(resS, resA); } @@ -372,8 +372,8 @@ public async Task KeySelector_Async_Cancel_All() [Fact] public void KeySelector_Async_Cancel_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, default(Func>), EqualityComparer.Default)); } [Fact] @@ -385,7 +385,7 @@ public async Task KeySelector_Async_Cancel_Comparer_All() var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, eq); - var resA = methodsA.GroupBy((m, ct) => new ValueTask(m.Name), eq); + var resA = methodsA.GroupByAwaitWithCancellation((m, ct) => new ValueTask(m.Name), eq); await Groups_AssertCore(resS, resA); } @@ -393,9 +393,9 @@ public async Task KeySelector_Async_Cancel_Comparer_All() [Fact] public void KeySelector_ElementSelector_Async_Cancel_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (int x, CancellationToken ct) => new ValueTask(x))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, (int x, CancellationToken ct) => new ValueTask(x), default(Func>))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, default(Func>), (int x, CancellationToken ct) => new ValueTask(x))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, (int x, CancellationToken ct) => new ValueTask(x), default(Func>))); } [Fact] @@ -405,7 +405,7 @@ public async Task KeySelector_ElementSelector_Async_Cancel_All() var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper()); - var resA = methodsA.GroupBy((m, ct) => new ValueTask(m.Name), (m, ct) => new ValueTask(m.Name.ToUpper())); + var resA = methodsA.GroupByAwaitWithCancellation((m, ct) => new ValueTask(m.Name), (m, ct) => new ValueTask(m.Name.ToUpper())); await Groups_AssertCore(resS, resA); } @@ -413,9 +413,9 @@ public async Task KeySelector_ElementSelector_Async_Cancel_All() [Fact] public void KeySelector_ElementSelector_Async_Cancel_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (int x, CancellationToken ct) => new ValueTask(x), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), default(Func>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, default(Func>), (int x, CancellationToken ct) => new ValueTask(x), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), default(Func>), EqualityComparer.Default)); } [Fact] @@ -427,7 +427,7 @@ public async Task KeySelector_ElementSelector_Async_Cancel_Comparer_All() var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper(), eq); - var resA = methodsA.GroupBy((m, ct) => new ValueTask(m.Name), (m, ct) => new ValueTask(m.Name.ToUpper()), eq); + var resA = methodsA.GroupByAwaitWithCancellation((m, ct) => new ValueTask(m.Name), (m, ct) => new ValueTask(m.Name.ToUpper()), eq); await Groups_AssertCore(resS, resA); } @@ -435,9 +435,9 @@ public async Task KeySelector_ElementSelector_Async_Cancel_Comparer_All() [Fact] public void KeySelector_ResultSelector_Async_Cancel_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (k, g, ct) => new ValueTask(0))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, (int x, CancellationToken ct) => new ValueTask(x), default(Func, CancellationToken, ValueTask>))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, default(Func>), (k, g, ct) => new ValueTask(0))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, (int x, CancellationToken ct) => new ValueTask(x), default(Func, CancellationToken, ValueTask>))); } [Fact] @@ -447,7 +447,7 @@ public async Task KeySelector_ResultSelector_Async_Cancel_All() var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name, (k, g) => k + " - " + g.Count()); - var resA = methodsA.GroupBy((m, ct) => new ValueTask(m.Name), async (k, g, ct) => k + " - " + await g.CountAsync(ct)); + var resA = methodsA.GroupByAwaitWithCancellation((m, ct) => new ValueTask(m.Name), async (k, g, ct) => k + " - " + await g.CountAsync(ct)); await Group_Result_AssertCore(resS, resA); } @@ -455,9 +455,9 @@ public async Task KeySelector_ResultSelector_Async_Cancel_All() [Fact] public void KeySelector_ResultSelector_Async_Cancel_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (k, g, ct) => new ValueTask(0), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), default(Func, CancellationToken, ValueTask>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, default(Func>), (k, g, ct) => new ValueTask(0), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), default(Func, CancellationToken, ValueTask>), EqualityComparer.Default)); } [Fact] @@ -469,7 +469,7 @@ public async Task KeySelector_ResultSelector_Async_Cancel_Comparer_All() var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, (k, g) => k + " - " + g.Count(), eq); - var resA = methodsA.GroupBy((m, ct) => new ValueTask(m.Name), async (k, g, ct) => k + " - " + await g.CountAsync(ct), eq); + var resA = methodsA.GroupByAwaitWithCancellation((m, ct) => new ValueTask(m.Name), async (k, g, ct) => k + " - " + await g.CountAsync(ct), eq); await Group_Result_AssertCore(resS, resA); } @@ -477,10 +477,10 @@ public async Task KeySelector_ResultSelector_Async_Cancel_Comparer_All() [Fact] public void KeySelector_ElementSelector_ResultSelector_Async_Cancel_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, (int x, CancellationToken ct) => new ValueTask(x), default(Func>), (k, g, ct) => new ValueTask(0))); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x), default(Func, CancellationToken, ValueTask>))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, default(Func>), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, (int x, CancellationToken ct) => new ValueTask(x), default(Func>), (k, g, ct) => new ValueTask(0))); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x), default(Func, CancellationToken, ValueTask>))); } [Fact] @@ -490,7 +490,7 @@ public async Task KeySelector_ElementSelector_ResultSelector_Async_Cancel_All() var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper(), (k, g) => k + " - " + g.Count()); - var resA = methodsA.GroupBy((m, ct) => new ValueTask(m.Name), (m, ct) => new ValueTask(m.Name.ToUpper()), async (k, g, ct) => k + " - " + await g.CountAsync(ct)); + var resA = methodsA.GroupByAwaitWithCancellation((m, ct) => new ValueTask(m.Name), (m, ct) => new ValueTask(m.Name.ToUpper()), async (k, g, ct) => k + " - " + await g.CountAsync(ct)); await Group_Result_AssertCore(resS, resA); } @@ -498,10 +498,10 @@ public async Task KeySelector_ElementSelector_ResultSelector_Async_Cancel_All() [Fact] public void KeySelector_ElementSelector_ResultSelector_Async_Cancel_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func>), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), default(Func>), (k, g, ct) => new ValueTask(0), EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x), default(Func, CancellationToken, ValueTask>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(Return42, default(Func>), (int x, CancellationToken ct) => new ValueTask(x), (k, g, ct) => new ValueTask(0), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), default(Func>), (k, g, ct) => new ValueTask(0), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupByAwaitWithCancellation(default(IAsyncEnumerable), (int x, CancellationToken ct) => new ValueTask(x), (int x, CancellationToken ct) => new ValueTask(x), default(Func, CancellationToken, ValueTask>), EqualityComparer.Default)); } [Fact] @@ -513,7 +513,7 @@ public async Task KeySelector_ElementSelector_ResultSelector_Async_Cancel_Compar var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper(), (k, g) => k + " - " + g.Count(), eq); - var resA = methodsA.GroupBy((m, ct) => new ValueTask(m.Name), (m, ct) => new ValueTask(m.Name.ToUpper()), async (k, g, ct) => k + " - " + await g.CountAsync(ct), eq); + var resA = methodsA.GroupByAwaitWithCancellation((m, ct) => new ValueTask(m.Name), (m, ct) => new ValueTask(m.Name.ToUpper()), async (k, g, ct) => k + " - " + await g.CountAsync(ct), eq); await Group_Result_AssertCore(resS, resA); } diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.Generated.tt b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.Generated.tt index 6e5e416970..3cac0da180 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.Generated.tt @@ -24,6 +24,7 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) { string keySelectorType, elementSelectorType, resultSelectorType; string keySelectorFunc, elementSelectorFunc, resultSelectorFunc; + string suffix; bool isCancel = false; switch (kind) @@ -33,18 +34,21 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) keySelectorFunc = elementSelectorFunc = "(int x) => x"; resultSelectorType = "Func, int>"; resultSelectorFunc = "(k, g) => 0"; + suffix = ""; break; case "Async": keySelectorType = elementSelectorType = "Func>"; keySelectorFunc = elementSelectorFunc = "(int x) => new ValueTask(x)"; resultSelectorType = "Func, ValueTask>"; resultSelectorFunc = "(k, g) => new ValueTask(0)"; + suffix = "Await"; break; case "Async_Cancel": keySelectorType = elementSelectorType = "Func>"; keySelectorFunc = elementSelectorFunc = "(int x, CancellationToken ct) => new ValueTask(x)"; resultSelectorType = "Func, CancellationToken, ValueTask>"; resultSelectorFunc = "(k, g, ct) => new ValueTask(0)"; + suffix = "AwaitWithCancellation"; isCancel = true; break; default: @@ -84,8 +88,8 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) [Fact] public void KeySelector_<#=kind#>_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(<#=keySelectorType#>))); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, default(<#=keySelectorType#>))); } [Fact] @@ -95,7 +99,7 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name); - var resA = methodsA.GroupBy(<#=keySelector#>); + var resA = methodsA.GroupBy<#=suffix#>(<#=keySelector#>); await Groups_AssertCore(resS, resA); } @@ -103,8 +107,8 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) [Fact] public void KeySelector_<#=kind#>_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>, EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(<#=keySelectorType#>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>, EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, default(<#=keySelectorType#>), EqualityComparer.Default)); } [Fact] @@ -116,7 +120,7 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, eq); - var resA = methodsA.GroupBy(<#=keySelector#>, eq); + var resA = methodsA.GroupBy<#=suffix#>(<#=keySelector#>, eq); await Groups_AssertCore(resS, resA); } @@ -124,9 +128,9 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) [Fact] public void KeySelector_ElementSelector_<#=kind#>_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=elementSelectorFunc#>)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(<#=keySelectorType#>), <#=elementSelectorFunc#>)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, <#=keySelectorFunc#>, default(<#=elementSelectorType#>))); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=elementSelectorFunc#>)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, default(<#=keySelectorType#>), <#=elementSelectorFunc#>)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, <#=keySelectorFunc#>, default(<#=elementSelectorType#>))); } [Fact] @@ -136,7 +140,7 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper()); - var resA = methodsA.GroupBy(<#=keySelector#>, <#=elementSelector#>); + var resA = methodsA.GroupBy<#=suffix#>(<#=keySelector#>, <#=elementSelector#>); await Groups_AssertCore(resS, resA); } @@ -144,9 +148,9 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) [Fact] public void KeySelector_ElementSelector_<#=kind#>_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=elementSelectorFunc#>, EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(<#=keySelectorType#>), <#=elementSelectorFunc#>, EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>, default(<#=elementSelectorType#>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=elementSelectorFunc#>, EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, default(<#=keySelectorType#>), <#=elementSelectorFunc#>, EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>, default(<#=elementSelectorType#>), EqualityComparer.Default)); } [Fact] @@ -158,7 +162,7 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper(), eq); - var resA = methodsA.GroupBy(<#=keySelector#>, <#=elementSelector#>, eq); + var resA = methodsA.GroupBy<#=suffix#>(<#=keySelector#>, <#=elementSelector#>, eq); await Groups_AssertCore(resS, resA); } @@ -166,9 +170,9 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) [Fact] public void KeySelector_ResultSelector_<#=kind#>_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=resultSelectorFunc#>)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(<#=keySelectorType#>), <#=resultSelectorFunc#>)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, <#=keySelectorFunc#>, default(<#=resultSelectorType#>))); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=resultSelectorFunc#>)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, default(<#=keySelectorType#>), <#=resultSelectorFunc#>)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, <#=keySelectorFunc#>, default(<#=resultSelectorType#>))); } [Fact] @@ -178,20 +182,7 @@ foreach (var kind in new[] { "Sync", "Async", "Async_Cancel" }) var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name, (k, g) => k + " - " + g.Count()); -<# -if (kind == "Async") -{ -#> - var resA = methodsA.GroupBy(<#=keySelector#>, <#=resultSelector#>); // REVIEW: Ambiguity -<# -} -else -{ -#> - var resA = methodsA.GroupBy(<#=keySelector#>, <#=resultSelector#>); -<# -} -#> + var resA = methodsA.GroupBy<#=suffix#>(<#=keySelector#>, <#=resultSelector#>); await Group_Result_AssertCore(resS, resA); } @@ -199,9 +190,9 @@ else [Fact] public void KeySelector_ResultSelector_<#=kind#>_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=resultSelectorFunc#>, EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(<#=keySelectorType#>), <#=resultSelectorFunc#>, EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>, default(<#=resultSelectorType#>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=resultSelectorFunc#>, EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, default(<#=keySelectorType#>), <#=resultSelectorFunc#>, EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>, default(<#=resultSelectorType#>), EqualityComparer.Default)); } [Fact] @@ -213,7 +204,7 @@ else var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, (k, g) => k + " - " + g.Count(), eq); - var resA = methodsA.GroupBy(<#=keySelector#>, <#=resultSelector#>, eq); + var resA = methodsA.GroupBy<#=suffix#>(<#=keySelector#>, <#=resultSelector#>, eq); await Group_Result_AssertCore(resS, resA); } @@ -221,10 +212,10 @@ else [Fact] public void KeySelector_ElementSelector_ResultSelector_<#=kind#>_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=elementSelectorFunc#>, <#=resultSelectorFunc#>)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(<#=keySelectorType#>), <#=elementSelectorFunc#>, <#=resultSelectorFunc#>)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, <#=keySelectorFunc#>, default(<#=elementSelectorType#>), <#=resultSelectorFunc#>)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, <#=keySelectorFunc#>, <#=elementSelectorFunc#>, default(<#=resultSelectorType#>))); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=elementSelectorFunc#>, <#=resultSelectorFunc#>)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, default(<#=keySelectorType#>), <#=elementSelectorFunc#>, <#=resultSelectorFunc#>)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, <#=keySelectorFunc#>, default(<#=elementSelectorType#>), <#=resultSelectorFunc#>)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, <#=keySelectorFunc#>, <#=elementSelectorFunc#>, default(<#=resultSelectorType#>))); } [Fact] @@ -234,20 +225,7 @@ else var methodsA = methodsS.ToAsyncEnumerable(); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper(), (k, g) => k + " - " + g.Count()); -<# -if (kind == "Async") -{ -#> - var resA = methodsA.GroupBy(<#=keySelector#>, <#=elementSelector#>, <#=resultSelector#>); // REVIEW: Ambiguity -<# -} -else -{ -#> - var resA = methodsA.GroupBy(<#=keySelector#>, <#=elementSelector#>, <#=resultSelector#>); -<# -} -#> + var resA = methodsA.GroupBy<#=suffix#>(<#=keySelector#>, <#=elementSelector#>, <#=resultSelector#>); await Group_Result_AssertCore(resS, resA); } @@ -255,10 +233,10 @@ else [Fact] public void KeySelector_ElementSelector_ResultSelector_<#=kind#>_Comparer_Null() { - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=elementSelectorFunc#>, <#=resultSelectorFunc#>, EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(<#=keySelectorType#>), <#=elementSelectorFunc#>, <#=resultSelectorFunc#>, EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>, default(<#=elementSelectorType#>), <#=resultSelectorFunc#>, EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=elementSelectorFunc#>, default(<#=resultSelectorType#>), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=elementSelectorFunc#>, <#=resultSelectorFunc#>, EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(Return42, default(<#=keySelectorType#>), <#=elementSelectorFunc#>, <#=resultSelectorFunc#>, EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>, default(<#=elementSelectorType#>), <#=resultSelectorFunc#>, EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy<#=suffix#>(default(IAsyncEnumerable), <#=keySelectorFunc#>, <#=elementSelectorFunc#>, default(<#=resultSelectorType#>), EqualityComparer.Default)); } [Fact] @@ -270,7 +248,7 @@ else var eq = new StringPrefixEqualityComparer(1); var resS = methodsS.GroupBy(m => m.Name, m => m.Name.ToUpper(), (k, g) => k + " - " + g.Count(), eq); - var resA = methodsA.GroupBy(<#=keySelector#>, <#=elementSelector#>, <#=resultSelector#>, eq); + var resA = methodsA.GroupBy<#=suffix#>(<#=keySelector#>, <#=elementSelector#>, <#=resultSelector#>, eq); await Group_Result_AssertCore(resS, resA); } diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.cs index 6d04d8ef96..c3249c3221 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/GroupBy.cs @@ -214,7 +214,7 @@ public async Task GroupBy_KeySelector_Sync_SequenceIdentity() public void GroupBy_KeySelector_Sync_Comparer_Null() { Assert.Throws(() => AsyncEnumerable.GroupBy(default, x => x, EqualityComparer.Default)); - Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default(Func), EqualityComparer.Default)); + Assert.Throws(() => AsyncEnumerable.GroupBy(Return42, default, EqualityComparer.Default)); } [Fact] diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Last.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Last.cs index ea470b905f..026ebe24f9 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Last.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Last.cs @@ -23,17 +23,17 @@ public async Task Last_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.LastAsync(Return42, default(Func)).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.LastAsync(default, x => true, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastAsync(Return42, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastAsync(Return42, default, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastAsync(default, x => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastAwaitAsync(default, x => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastAwaitAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastAwaitAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastAwaitAsync(Return42, default, CancellationToken.None).AsTask()); #if !NO_DEEP_CANCELLATION - await Assert.ThrowsAsync(() => AsyncEnumerable.LastAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastAwaitWithCancellationAsync(Return42, default, CancellationToken.None).AsTask()); #endif } @@ -173,159 +173,159 @@ public async Task LastAsync_Predicate_PredicateThrows() } [Fact] - public async Task LastAsync_AsyncPredicate_Empty() + public async Task LastAwaitAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().LastAsync(x => new ValueTask(true)); + var res = AsyncEnumerable.Empty().LastAwaitAsync(x => new ValueTask(true)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task LastAsync_AsyncPredicate_Throw() + public async Task LastAwaitAsync_Predicate_Throw() { var ex = new Exception("Bang!"); - var res = Throw(ex).LastAsync(x => new ValueTask(true)); + var res = Throw(ex).LastAwaitAsync(x => new ValueTask(true)); await AssertThrowsAsync(res, ex); } [Fact] - public async Task LastAsync_AsyncPredicate_Single_None() + public async Task LastAwaitAsync_Predicate_Single_None() { - var res = Return42.LastAsync(x => new ValueTask(x % 2 != 0)); + var res = Return42.LastAwaitAsync(x => new ValueTask(x % 2 != 0)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task LastAsync_AsyncPredicate_Many_IList_None() + public async Task LastAwaitAsync_Predicate_Many_IList_None() { - var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().LastAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().LastAwaitAsync(x => new ValueTask(x % 2 != 0)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task LastAsync_AsyncPredicate_Many_None() + public async Task LastAwaitAsync_Predicate_Many_None() { - var res = new[] { 40, 42, 44 }.Select(x => x).ToAsyncEnumerable().LastAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 40, 42, 44 }.Select(x => x).ToAsyncEnumerable().LastAwaitAsync(x => new ValueTask(x % 2 != 0)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task LastAsync_AsyncPredicate_Single_Pass() + public async Task LastAwaitAsync_Predicate_Single_Pass() { - var res = Return42.LastAsync(x => new ValueTask(x % 2 == 0)); + var res = Return42.LastAwaitAsync(x => new ValueTask(x % 2 == 0)); Assert.Equal(42, await res); } [Fact] - public async Task LastAsync_AsyncPredicate_Many_IList_Pass1() + public async Task LastAwaitAsync_Predicate_Many_IList_Pass1() { - var res = new[] { 43, 44, 45 }.ToAsyncEnumerable().LastAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 43, 44, 45 }.ToAsyncEnumerable().LastAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task LastAsync_AsyncPredicate_Many_IList_Pass2() + public async Task LastAwaitAsync_Predicate_Many_IList_Pass2() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().LastAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().LastAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task LastAsync_AsyncPredicate_Many_Pass1() + public async Task LastAwaitAsync_Predicate_Many_Pass1() { - var res = new[] { 43, 44, 45 }.Select(x => x).ToAsyncEnumerable().LastAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 43, 44, 45 }.Select(x => x).ToAsyncEnumerable().LastAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task LastAsync_AsyncPredicate_Many_Pass2() + public async Task LastAwaitAsync_Predicate_Many_Pass2() { - var res = new[] { 42, 45, 90 }.Select(x => x).ToAsyncEnumerable().LastAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.Select(x => x).ToAsyncEnumerable().LastAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task LastAsync_AsyncPredicate_AsyncPredicateThrows() + public async Task LastAwaitAsync_Predicate_AsyncPredicateThrows() { - var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().LastAsync(x => new ValueTask(1 / x > 0)); + var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().LastAwaitAsync(x => new ValueTask(1 / x > 0)); await AssertThrowsAsync(res.AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task LastAsync_AsyncPredicateWithCancellation_Empty() + public async Task LastAwaitWithCancellationAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().LastAsync((x, ct) => new ValueTask(true), CancellationToken.None); + var res = AsyncEnumerable.Empty().LastAwaitWithCancellationAsync((x, ct) => new ValueTask(true), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task LastAsync_AsyncPredicateWithCancellation_Throw() + public async Task LastAwaitWithCancellationAsync_Predicate_Throw() { var ex = new Exception("Bang!"); - var res = Throw(ex).LastAsync((x, ct) => new ValueTask(true), CancellationToken.None); + var res = Throw(ex).LastAwaitWithCancellationAsync((x, ct) => new ValueTask(true), CancellationToken.None); await AssertThrowsAsync(res, ex); } [Fact] - public async Task LastAsync_AsyncPredicateWithCancellation_Single_None() + public async Task LastAwaitWithCancellationAsync_Predicate_Single_None() { - var res = Return42.LastAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = Return42.LastAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task LastAsync_AsyncPredicateWithCancellation_Many_IList_None() + public async Task LastAwaitWithCancellationAsync_Predicate_Many_IList_None() { - var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().LastAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().LastAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task LastAsync_AsyncPredicateWithCancellation_Many_None() + public async Task LastAwaitWithCancellationAsync_Predicate_Many_None() { - var res = new[] { 40, 42, 44 }.Select((x, ct) => x).ToAsyncEnumerable().LastAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 40, 42, 44 }.Select((x, ct) => x).ToAsyncEnumerable().LastAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task LastAsync_AsyncPredicateWithCancellation_Single_Pass() + public async Task LastAwaitWithCancellationAsync_Predicate_Single_Pass() { - var res = Return42.LastAsync((x, ct) => new ValueTask(x % 2 == 0), CancellationToken.None); + var res = Return42.LastAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 == 0), CancellationToken.None); Assert.Equal(42, await res); } [Fact] - public async Task LastAsync_AsyncPredicateWithCancellation_Many_IList_Pass1() + public async Task LastAwaitWithCancellationAsync_Predicate_Many_IList_Pass1() { - var res = new[] { 43, 44, 45 }.ToAsyncEnumerable().LastAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 43, 44, 45 }.ToAsyncEnumerable().LastAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task LastAsync_AsyncPredicateWithCancellation_Many_IList_Pass2() + public async Task LastAwaitWithCancellationAsync_Predicate_Many_IList_Pass2() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().LastAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().LastAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task LastAsync_AsyncPredicateWithCancellation_Many_Pass1() + public async Task LastAwaitWithCancellationAsync_Predicate_Many_Pass1() { - var res = new[] { 43, 44, 45 }.Select((x, ct) => x).ToAsyncEnumerable().LastAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 43, 44, 45 }.Select((x, ct) => x).ToAsyncEnumerable().LastAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task LastAsync_AsyncPredicateWithCancellation_Many_Pass2() + public async Task LastAwaitWithCancellationAsync_Predicate_Many_Pass2() { - var res = new[] { 42, 45, 90 }.Select((x, ct) => x).ToAsyncEnumerable().LastAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 45, 90 }.Select((x, ct) => x).ToAsyncEnumerable().LastAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task LastAsync_AsyncPredicateWithCancellation_AsyncPredicateWithCancellationThrows() + public async Task LastAwaitWithCancellationAsync_Predicate_AsyncPredicateWithCancellationThrows() { - var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().LastAsync((x, ct) => new ValueTask(1 / x > 0), CancellationToken.None); + var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().LastAwaitWithCancellationAsync((x, ct) => new ValueTask(1 / x > 0), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } #endif diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LastOrDefault.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LastOrDefault.cs index bf72fa19c3..9f39b5738e 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LastOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LastOrDefault.cs @@ -23,17 +23,17 @@ public async Task LastOrDefault_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAsync(Return42, default(Func)).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAsync(default, x => true, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAsync(Return42, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAsync(Return42, default, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAsync(default, x => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAwaitAsync(default, x => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAwaitAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAwaitAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAwaitAsync(Return42, default, CancellationToken.None).AsTask()); #if !NO_DEEP_CANCELLATION - await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LastOrDefaultAwaitWithCancellationAsync(Return42, default, CancellationToken.None).AsTask()); #endif } @@ -173,159 +173,159 @@ public async Task LastOrDefaultAsync_Predicate_PredicateThrows() } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicate_Empty() + public async Task LastOrDefaultAwaitAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().LastOrDefaultAsync(x => new ValueTask(true)); + var res = AsyncEnumerable.Empty().LastOrDefaultAwaitAsync(x => new ValueTask(true)); Assert.Equal(0, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicate_Throw() + public async Task LastOrDefaultAwaitAsync_Predicate_Throw() { var ex = new Exception("Bang!"); - var res = Throw(ex).LastOrDefaultAsync(x => new ValueTask(true)); + var res = Throw(ex).LastOrDefaultAwaitAsync(x => new ValueTask(true)); await AssertThrowsAsync(res, ex); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicate_Single_None() + public async Task LastOrDefaultAwaitAsync_Predicate_Single_None() { - var res = Return42.LastOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = Return42.LastOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(0, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicate_Many_IList_None() + public async Task LastOrDefaultAwaitAsync_Predicate_Many_IList_None() { - var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().LastOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().LastOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(0, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicate_Many_None() + public async Task LastOrDefaultAwaitAsync_Predicate_Many_None() { - var res = new[] { 40, 42, 44 }.Select(x => x).ToAsyncEnumerable().LastOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 40, 42, 44 }.Select(x => x).ToAsyncEnumerable().LastOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(0, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicate_Single_Pass() + public async Task LastOrDefaultAwaitAsync_Predicate_Single_Pass() { - var res = Return42.LastOrDefaultAsync(x => new ValueTask(x % 2 == 0)); + var res = Return42.LastOrDefaultAwaitAsync(x => new ValueTask(x % 2 == 0)); Assert.Equal(42, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicate_Many_IList_Pass1() + public async Task LastOrDefaultAwaitAsync_Predicate_Many_IList_Pass1() { - var res = new[] { 43, 44, 45 }.ToAsyncEnumerable().LastOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 43, 44, 45 }.ToAsyncEnumerable().LastOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicate_Many_IList_Pass2() + public async Task LastOrDefaultAwaitAsync_Predicate_Many_IList_Pass2() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().LastOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().LastOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicate_Many_Pass1() + public async Task LastOrDefaultAwaitAsync_Predicate_Many_Pass1() { - var res = new[] { 43, 44, 45 }.Select(x => x).ToAsyncEnumerable().LastOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 43, 44, 45 }.Select(x => x).ToAsyncEnumerable().LastOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicate_Many_Pass2() + public async Task LastOrDefaultAwaitAsync_Predicate_Many_Pass2() { - var res = new[] { 42, 45, 90 }.Select(x => x).ToAsyncEnumerable().LastOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.Select(x => x).ToAsyncEnumerable().LastOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicate_AsyncPredicateThrows() + public async Task LastOrDefaultAwaitAsync_Predicate_AsyncPredicateThrows() { - var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().LastOrDefaultAsync(x => new ValueTask(1 / x > 0)); + var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().LastOrDefaultAwaitAsync(x => new ValueTask(1 / x > 0)); await AssertThrowsAsync(res.AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task LastOrDefaultAsync_AsyncPredicateWithCancellation_Empty() + public async Task LastOrDefaultAwaitWithCancellationAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().LastOrDefaultAsync((x, ct) => new ValueTask(true), CancellationToken.None); + var res = AsyncEnumerable.Empty().LastOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(true), CancellationToken.None); Assert.Equal(0, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicateWithCancellation_Throw() + public async Task LastOrDefaultAwaitWithCancellationAsync_Predicate_Throw() { var ex = new Exception("Bang!"); - var res = Throw(ex).LastOrDefaultAsync((x, ct) => new ValueTask(true), CancellationToken.None); + var res = Throw(ex).LastOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(true), CancellationToken.None); await AssertThrowsAsync(res, ex); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicateWithCancellation_Single_None() + public async Task LastOrDefaultAwaitWithCancellationAsync_Predicate_Single_None() { - var res = Return42.LastOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = Return42.LastOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(0, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicateWithCancellation_Many_IList_None() + public async Task LastOrDefaultAwaitWithCancellationAsync_Predicate_Many_IList_None() { - var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().LastOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 40, 42, 44 }.ToAsyncEnumerable().LastOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(0, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicateWithCancellation_Many_None() + public async Task LastOrDefaultAwaitWithCancellationAsync_Predicate_Many_None() { - var res = new[] { 40, 42, 44 }.Select((x, ct) => x).ToAsyncEnumerable().LastOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 40, 42, 44 }.Select((x, ct) => x).ToAsyncEnumerable().LastOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(0, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicateWithCancellation_Single_Pass() + public async Task LastOrDefaultAwaitWithCancellationAsync_Predicate_Single_Pass() { - var res = Return42.LastOrDefaultAsync((x, ct) => new ValueTask(x % 2 == 0), CancellationToken.None); + var res = Return42.LastOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 == 0), CancellationToken.None); Assert.Equal(42, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicateWithCancellation_Many_IList_Pass1() + public async Task LastOrDefaultAwaitWithCancellationAsync_Predicate_Many_IList_Pass1() { - var res = new[] { 43, 44, 45 }.ToAsyncEnumerable().LastOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 43, 44, 45 }.ToAsyncEnumerable().LastOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicateWithCancellation_Many_IList_Pass2() + public async Task LastOrDefaultAwaitWithCancellationAsync_Predicate_Many_IList_Pass2() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().LastOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().LastOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicateWithCancellation_Many_Pass1() + public async Task LastOrDefaultAwaitWithCancellationAsync_Predicate_Many_Pass1() { - var res = new[] { 43, 44, 45 }.Select((x, ct) => x).ToAsyncEnumerable().LastOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 43, 44, 45 }.Select((x, ct) => x).ToAsyncEnumerable().LastOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicateWithCancellation_Many_Pass2() + public async Task LastOrDefaultAwaitWithCancellationAsync_Predicate_Many_Pass2() { - var res = new[] { 42, 45, 90 }.Select((x, ct) => x).ToAsyncEnumerable().LastOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); + var res = new[] { 42, 45, 90 }.Select((x, ct) => x).ToAsyncEnumerable().LastOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0), CancellationToken.None); Assert.Equal(45, await res); } [Fact] - public async Task LastOrDefaultAsync_AsyncPredicateWithCancellation_AsyncPredicateWithCancellationThrows() + public async Task LastOrDefaultAwaitWithCancellationAsync_Predicate_AsyncPredicateWithCancellationThrows() { - var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().LastOrDefaultAsync((x, ct) => new ValueTask(1 / x > 0), CancellationToken.None); + var res = new[] { 0, 1, 2 }.ToAsyncEnumerable().LastOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(1 / x > 0), CancellationToken.None); await AssertThrowsAsync(res.AsTask()); } #endif diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LongCount.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LongCount.cs index cc31f9ea83..f38b41735d 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LongCount.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/LongCount.cs @@ -40,7 +40,7 @@ public async Task LongCountAsync_Predicate_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(Return42, default(Func)).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(default, x => true, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(Return42, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] @@ -66,68 +66,68 @@ public async Task LongCountAsync_Predicate_Throws_Source() } [Fact] - public async Task LongCountAsync_AsyncPredicate_Null() + public async Task LongCountAwaitAsync_Predicate_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(default, x => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAwaitAsync(default, x => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAwaitAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAwaitAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAwaitAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task LongCountAsync_AsyncPredicate() + public async Task LongCountAwaitAsync_Predicate() { - Assert.Equal(0, await new int[0].ToAsyncEnumerable().LongCountAsync(x => new ValueTask(x < 3))); - Assert.Equal(2, await new[] { 1, 2, 3 }.ToAsyncEnumerable().LongCountAsync(x => new ValueTask(x < 3))); + Assert.Equal(0, await new int[0].ToAsyncEnumerable().LongCountAwaitAsync(x => new ValueTask(x < 3))); + Assert.Equal(2, await new[] { 1, 2, 3 }.ToAsyncEnumerable().LongCountAwaitAsync(x => new ValueTask(x < 3))); } [Fact] - public async Task LongCountAsync_AsyncPredicate_Throws_Predicate() + public async Task LongCountAwaitAsync_Predicate_Throws_Predicate() { var ex = new Exception("Bang!"); - var ys = new[] { 1, 2, 3 }.ToAsyncEnumerable().LongCountAsync(new Func>(x => { throw ex; })); + var ys = new[] { 1, 2, 3 }.ToAsyncEnumerable().LongCountAwaitAsync(new Func>(x => { throw ex; })); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task LongCountAsync_AsyncPredicate_Throws_Source() + public async Task LongCountAwaitAsync_Predicate_Throws_Source() { var ex = new Exception("Bang!"); - await AssertThrowsAsync(Throw(ex).LongCountAsync(x => new ValueTask(x < 3)), ex); + await AssertThrowsAsync(Throw(ex).LongCountAwaitAsync(x => new ValueTask(x < 3)), ex); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task LongCountAsync_AsyncPredicateCancel_Null() + public async Task LongCountAwaitWithCancellationAsync_Predicate_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(default, (x, ct) => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAwaitWithCancellationAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.LongCountAwaitWithCancellationAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task LongCountAsync_AsyncPredicateCancel() + public async Task LongCountAwaitWithCancellationAsync_Predicate() { - Assert.Equal(0, await new int[0].ToAsyncEnumerable().LongCountAsync((x, ct) => new ValueTask(x < 3))); - Assert.Equal(2, await new[] { 1, 2, 3 }.ToAsyncEnumerable().LongCountAsync((x, ct) => new ValueTask(x < 3))); + Assert.Equal(0, await new int[0].ToAsyncEnumerable().LongCountAwaitWithCancellationAsync((x, ct) => new ValueTask(x < 3))); + Assert.Equal(2, await new[] { 1, 2, 3 }.ToAsyncEnumerable().LongCountAwaitWithCancellationAsync((x, ct) => new ValueTask(x < 3))); } [Fact] - public async Task LongCountAsync_AsyncPredicateCancel_Throws_Predicate() + public async Task LongCountAwaitWithCancellationAsync_Predicate_Throws_Predicate() { var ex = new Exception("Bang!"); - var ys = new[] { 1, 2, 3 }.ToAsyncEnumerable().LongCountAsync(new Func>((x, ct) => { throw ex; })); + var ys = new[] { 1, 2, 3 }.ToAsyncEnumerable().LongCountAwaitWithCancellationAsync(new Func>((x, ct) => { throw ex; })); await AssertThrowsAsync(ys, ex); } [Fact] - public async Task LongCountAsync_AsyncPredicateCancel_Throws_Source() + public async Task LongCountAwaitWithCancellationAsync_Predicate_Throws_Source() { var ex = new Exception("Bang!"); - await AssertThrowsAsync(Throw(ex).LongCountAsync((x, ct) => new ValueTask(x < 3)), ex); + await AssertThrowsAsync(Throw(ex).LongCountAwaitWithCancellationAsync((x, ct) => new ValueTask(x < 3)), ex); } #endif } diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Max.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Max.cs index fddf2a33fa..449a75331f 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Max.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Max.cs @@ -79,7 +79,7 @@ public async Task MaxAsync_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => x, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => x, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); @@ -92,76 +92,76 @@ public async Task MaxAsync_Null() // Max(IAE, Func>) - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); // Max(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #if !NO_DEEP_CANCELLATION // Max(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #endif // Max(IAE) @@ -184,19 +184,19 @@ public async Task MaxAsync_Null() // Max(IAE, Func>) - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); // Max(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #if !NO_DEEP_CANCELLATION // Max(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MaxAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #endif } @@ -207,9 +207,9 @@ public async Task MaxAsync_Int32() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -220,9 +220,9 @@ public async Task MaxAsync_Nullable_Int32() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -233,9 +233,9 @@ public async Task MaxAsync_Int64() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -246,9 +246,9 @@ public async Task MaxAsync_Nullable_Int64() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -259,9 +259,9 @@ public async Task MaxAsync_Double() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -272,9 +272,9 @@ public async Task MaxAsync_Nullable_Double() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -285,9 +285,9 @@ public async Task MaxAsync_Single() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -298,9 +298,9 @@ public async Task MaxAsync_Nullable_Single() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -311,9 +311,9 @@ public async Task MaxAsync_Decimal() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -324,9 +324,9 @@ public async Task MaxAsync_Nullable_Decimal() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -337,9 +337,9 @@ public async Task MaxAsync_TSource_Value() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -350,9 +350,9 @@ public async Task MaxAsync_TSource_NonValue() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -362,9 +362,9 @@ public async Task MaxAsync_TSource_Value_Empty() var xs = new DateTimeOffset[0].ToAsyncEnumerable(); await AssertThrowsAsync(xs.MaxAsync().AsTask()); await AssertThrowsAsync(xs.MaxAsync(x => x).AsTask()); - await AssertThrowsAsync(xs.MaxAsync(x => new ValueTask(x)).AsTask()); + await AssertThrowsAsync(xs.MaxAwaitAsync(x => new ValueTask(x)).AsTask()); #if !NO_DEEP_CANCELLATION - await AssertThrowsAsync(xs.MaxAsync((x, ct) => new ValueTask(x)).AsTask()); + await AssertThrowsAsync(xs.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x)).AsTask()); #endif } @@ -374,9 +374,9 @@ public async Task MaxAsync_TSource_NonValue_Empty() var xs = new string[0].ToAsyncEnumerable(); Assert.Null(await xs.MaxAsync()); Assert.Null(await xs.MaxAsync(x => x)); - Assert.Null(await xs.MaxAsync(x => new ValueTask(x))); + Assert.Null(await xs.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Null(await xs.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Null(await xs.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -386,9 +386,9 @@ public async Task MaxAsync_TSource_NullableValue_Empty() var xs = new DateTimeOffset?[0].ToAsyncEnumerable(); Assert.Null(await xs.MaxAsync()); Assert.Null(await xs.MaxAsync(x => x)); - Assert.Null(await xs.MaxAsync(x => new ValueTask(x))); + Assert.Null(await xs.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Null(await xs.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Null(await xs.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -399,9 +399,9 @@ public async Task MaxAsync_TSource_NullableValue_SomeNull() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Max(), await ys.MaxAsync()); Assert.Equal(xs.Max(), await ys.MaxAsync(x => x)); - Assert.Equal(xs.Max(), await ys.MaxAsync(x => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Max(), await ys.MaxAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Max(), await ys.MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } } diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Min.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Min.cs index aa8a5fff2d..8fd7f3d6a8 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Min.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Min.cs @@ -79,7 +79,7 @@ public async Task MinAsync_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => x, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => x, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); @@ -92,76 +92,76 @@ public async Task MinAsync_Null() // Min(IAE, Func>) - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); // Min(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #if !NO_DEEP_CANCELLATION // Min(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #endif // Min(IAE) @@ -184,19 +184,19 @@ public async Task MinAsync_Null() // Min(IAE, Func>) - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); // Min(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #if !NO_DEEP_CANCELLATION // Min(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.MinAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.MinAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #endif } @@ -207,9 +207,9 @@ public async Task MinAsync_Int32() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -220,9 +220,9 @@ public async Task MinAsync_Nullable_Int32() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -233,9 +233,9 @@ public async Task MinAsync_Int64() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -246,9 +246,9 @@ public async Task MinAsync_Nullable_Int64() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -259,9 +259,9 @@ public async Task MinAsync_Double() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -272,9 +272,9 @@ public async Task MinAsync_Nullable_Double() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -285,9 +285,9 @@ public async Task MinAsync_Single() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -298,9 +298,9 @@ public async Task MinAsync_Nullable_Single() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -311,9 +311,9 @@ public async Task MinAsync_Decimal() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -324,9 +324,9 @@ public async Task MinAsync_Nullable_Decimal() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -337,9 +337,9 @@ public async Task MinAsync_TSource_Value() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -350,9 +350,9 @@ public async Task MinAsync_TSource_NonValue() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -362,9 +362,9 @@ public async Task MinAsync_TSource_Value_Empty() var xs = new DateTimeOffset[0].ToAsyncEnumerable(); await AssertThrowsAsync(xs.MinAsync().AsTask()); await AssertThrowsAsync(xs.MinAsync(x => x).AsTask()); - await AssertThrowsAsync(xs.MinAsync(x => new ValueTask(x)).AsTask()); + await AssertThrowsAsync(xs.MinAwaitAsync(x => new ValueTask(x)).AsTask()); #if !NO_DEEP_CANCELLATION - await AssertThrowsAsync(xs.MinAsync((x, ct) => new ValueTask(x)).AsTask()); + await AssertThrowsAsync(xs.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x)).AsTask()); #endif } @@ -374,9 +374,9 @@ public async Task MinAsync_TSource_NonValue_Empty() var xs = new string[0].ToAsyncEnumerable(); Assert.Null(await xs.MinAsync()); Assert.Null(await xs.MinAsync(x => x)); - Assert.Null(await xs.MinAsync(x => new ValueTask(x))); + Assert.Null(await xs.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Null(await xs.MinAsync((x, ct) => new ValueTask(x))); + Assert.Null(await xs.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -386,9 +386,9 @@ public async Task MinAsync_TSource_NullableValue_Empty() var xs = new DateTimeOffset?[0].ToAsyncEnumerable(); Assert.Null(await xs.MinAsync()); Assert.Null(await xs.MinAsync(x => x)); - Assert.Null(await xs.MinAsync(x => new ValueTask(x))); + Assert.Null(await xs.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Null(await xs.MinAsync((x, ct) => new ValueTask(x))); + Assert.Null(await xs.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } @@ -399,9 +399,9 @@ public async Task MinAsync_TSource_NullableValue_SomeNull() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Min(), await ys.MinAsync()); Assert.Equal(xs.Min(), await ys.MinAsync(x => x)); - Assert.Equal(xs.Min(), await ys.MinAsync(x => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitAsync(x => new ValueTask(x))); #if !NO_DEEP_CANCELLATION - Assert.Equal(xs.Min(), await ys.MinAsync((x, ct) => new ValueTask(x))); + Assert.Equal(xs.Min(), await ys.MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x))); #endif } } diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/MinMax.Generated.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/MinMax.Generated.cs index 9eb07b0dee..78ef70542c 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/MinMax.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/MinMax.Generated.cs @@ -14,59 +14,59 @@ namespace Tests public class MinMax : AsyncEnumerableTests { [Fact] - public async Task Min_Empty_Int32() + public async Task MinAsync_Empty_Int32() { await AssertThrowsAsync(new int[0].ToAsyncEnumerable().MinAsync(CancellationToken.None).AsTask()); } [Fact] - public async Task Min_Selector_Empty_Int32() + public async Task MinAsync_Selector_Empty_Int32() { await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync(_ => default(int), CancellationToken.None).AsTask()); } [Fact] - public async Task Min_AsyncSelector_Empty_Int32() + public async Task MinAwaitAsync_Selector_Empty_Int32() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAwaitAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Empty_Int32() + public async Task MinAwaitWithCancellationAsync_Selector_Empty_Int32() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); } #endif [Fact] - public async Task Min_Empty_Nullable_Int32() + public async Task MinAsync_Empty_Nullable_Int32() { Assert.Null(await new int?[0].ToAsyncEnumerable().MinAsync(CancellationToken.None)); } [Fact] - public async Task Min_Selector_Empty_Nullable_Int32() + public async Task MinAsync_Selector_Empty_Nullable_Int32() { Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync(_ => default(int?), CancellationToken.None)); } [Fact] - public async Task Min_AsyncSelector_Empty_Nullable_Int32() + public async Task MinAwaitAsync_Selector_Empty_Nullable_Int32() { - Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync(_ => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MinAwaitAsync(_ => default(ValueTask), CancellationToken.None)); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Empty_Nullable_Int32() + public async Task MinAwaitWithCancellationAsync_Selector_Empty_Nullable_Int32() { - Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync((x, ct) => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None)); } #endif [Fact] - public async Task Min_Int32_1() + public async Task MinAsync_Int32_1() { var input = new int[] { 33 }.AsEnumerable(); @@ -81,7 +81,7 @@ public async Task Min_Int32_1() } [Fact] - public async Task Min_Selector_Int32_1() + public async Task MinAsync_Selector_Int32_1() { var input = new int[] { 33 }.AsEnumerable(); @@ -96,14 +96,14 @@ public async Task Min_Selector_Int32_1() } [Fact] - public async Task Min_AsyncSelector_Int32_1() + public async Task MinAwaitAsync_Selector_Int32_1() { var input = new int[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -112,14 +112,14 @@ public async Task Min_AsyncSelector_Int32_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_1() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_1() { var input = new int[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -128,7 +128,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_1() #endif [Fact] - public async Task Min_Int32_Nullable_1_NoNull() + public async Task MinAsync_Int32_Nullable_1_NoNull() { var input = new int?[] { 33 }.AsEnumerable(); @@ -143,7 +143,7 @@ public async Task Min_Int32_Nullable_1_NoNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_1_NoNull() + public async Task MinAsync_Selector_Int32_Nullable_1_NoNull() { var input = new int?[] { 33 }.AsEnumerable(); @@ -158,14 +158,14 @@ public async Task Min_Selector_Int32_Nullable_1_NoNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_1_NoNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_1_NoNull() { var input = new int?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -174,14 +174,14 @@ public async Task Min_AsyncSelector_Int32_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_1_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_1_NoNull() { var input = new int?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -190,7 +190,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_1_NoNull() #endif [Fact] - public async Task Min_Int32_Nullable_1_AllNull() + public async Task MinAsync_Int32_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(int?), 1); @@ -200,7 +200,7 @@ public async Task Min_Int32_Nullable_1_AllNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_1_AllNull() + public async Task MinAsync_Selector_Int32_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(int?), 1); @@ -210,29 +210,29 @@ public async Task Min_Selector_Int32_Nullable_1_AllNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_1_AllNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(int?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_1_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(int?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Int32_Nullable_1_SomeNull() + public async Task MinAsync_Int32_Nullable_1_SomeNull() { var input = new int?[] { 33 }.AsEnumerable(); @@ -247,7 +247,7 @@ public async Task Min_Int32_Nullable_1_SomeNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_1_SomeNull() + public async Task MinAsync_Selector_Int32_Nullable_1_SomeNull() { var input = new int?[] { 33 }.AsEnumerable(); @@ -262,14 +262,14 @@ public async Task Min_Selector_Int32_Nullable_1_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_1_SomeNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_1_SomeNull() { var input = new int?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -278,14 +278,14 @@ public async Task Min_AsyncSelector_Int32_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_1_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_1_SomeNull() { var input = new int?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -294,7 +294,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_1_SomeNull() #endif [Fact] - public async Task Min_Int32_4() + public async Task MinAsync_Int32_4() { var input = new int[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -309,7 +309,7 @@ public async Task Min_Int32_4() } [Fact] - public async Task Min_Selector_Int32_4() + public async Task MinAsync_Selector_Int32_4() { var input = new int[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -324,14 +324,14 @@ public async Task Min_Selector_Int32_4() } [Fact] - public async Task Min_AsyncSelector_Int32_4() + public async Task MinAwaitAsync_Selector_Int32_4() { var input = new int[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -340,14 +340,14 @@ public async Task Min_AsyncSelector_Int32_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_4() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_4() { var input = new int[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -356,7 +356,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_4() #endif [Fact] - public async Task Min_Int32_Nullable_4_NoNull() + public async Task MinAsync_Int32_Nullable_4_NoNull() { var input = new int?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -371,7 +371,7 @@ public async Task Min_Int32_Nullable_4_NoNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_4_NoNull() + public async Task MinAsync_Selector_Int32_Nullable_4_NoNull() { var input = new int?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -386,14 +386,14 @@ public async Task Min_Selector_Int32_Nullable_4_NoNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_4_NoNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_4_NoNull() { var input = new int?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -402,14 +402,14 @@ public async Task Min_AsyncSelector_Int32_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_4_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_4_NoNull() { var input = new int?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -418,7 +418,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_4_NoNull() #endif [Fact] - public async Task Min_Int32_Nullable_4_AllNull() + public async Task MinAsync_Int32_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(int?), 4); @@ -428,7 +428,7 @@ public async Task Min_Int32_Nullable_4_AllNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_4_AllNull() + public async Task MinAsync_Selector_Int32_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(int?), 4); @@ -438,29 +438,29 @@ public async Task Min_Selector_Int32_Nullable_4_AllNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_4_AllNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(int?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_4_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(int?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Int32_Nullable_4_SomeNull() + public async Task MinAsync_Int32_Nullable_4_SomeNull() { var input = new int?[] { -2, null, -61, null }.AsEnumerable(); @@ -475,7 +475,7 @@ public async Task Min_Int32_Nullable_4_SomeNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_4_SomeNull() + public async Task MinAsync_Selector_Int32_Nullable_4_SomeNull() { var input = new int?[] { -2, null, -61, null }.AsEnumerable(); @@ -490,14 +490,14 @@ public async Task Min_Selector_Int32_Nullable_4_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_4_SomeNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_4_SomeNull() { var input = new int?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -506,14 +506,14 @@ public async Task Min_AsyncSelector_Int32_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_4_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_4_SomeNull() { var input = new int?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -522,7 +522,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_4_SomeNull() #endif [Fact] - public async Task Min_Int32_8() + public async Task MinAsync_Int32_8() { var input = new int[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -537,7 +537,7 @@ public async Task Min_Int32_8() } [Fact] - public async Task Min_Selector_Int32_8() + public async Task MinAsync_Selector_Int32_8() { var input = new int[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -552,14 +552,14 @@ public async Task Min_Selector_Int32_8() } [Fact] - public async Task Min_AsyncSelector_Int32_8() + public async Task MinAwaitAsync_Selector_Int32_8() { var input = new int[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -568,14 +568,14 @@ public async Task Min_AsyncSelector_Int32_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_8() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_8() { var input = new int[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -584,7 +584,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_8() #endif [Fact] - public async Task Min_Int32_Nullable_8_NoNull() + public async Task MinAsync_Int32_Nullable_8_NoNull() { var input = new int?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -599,7 +599,7 @@ public async Task Min_Int32_Nullable_8_NoNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_8_NoNull() + public async Task MinAsync_Selector_Int32_Nullable_8_NoNull() { var input = new int?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -614,14 +614,14 @@ public async Task Min_Selector_Int32_Nullable_8_NoNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_8_NoNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_8_NoNull() { var input = new int?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -630,14 +630,14 @@ public async Task Min_AsyncSelector_Int32_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_8_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_8_NoNull() { var input = new int?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -646,7 +646,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_8_NoNull() #endif [Fact] - public async Task Min_Int32_Nullable_8_AllNull() + public async Task MinAsync_Int32_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(int?), 8); @@ -656,7 +656,7 @@ public async Task Min_Int32_Nullable_8_AllNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_8_AllNull() + public async Task MinAsync_Selector_Int32_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(int?), 8); @@ -666,29 +666,29 @@ public async Task Min_Selector_Int32_Nullable_8_AllNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_8_AllNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(int?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_8_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(int?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Int32_Nullable_8_SomeNull() + public async Task MinAsync_Int32_Nullable_8_SomeNull() { var input = new int?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -703,7 +703,7 @@ public async Task Min_Int32_Nullable_8_SomeNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_8_SomeNull() + public async Task MinAsync_Selector_Int32_Nullable_8_SomeNull() { var input = new int?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -718,14 +718,14 @@ public async Task Min_Selector_Int32_Nullable_8_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_8_SomeNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_8_SomeNull() { var input = new int?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -734,14 +734,14 @@ public async Task Min_AsyncSelector_Int32_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_8_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_8_SomeNull() { var input = new int?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -750,7 +750,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_8_SomeNull() #endif [Fact] - public async Task Min_Int32_16() + public async Task MinAsync_Int32_16() { var input = new int[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -765,7 +765,7 @@ public async Task Min_Int32_16() } [Fact] - public async Task Min_Selector_Int32_16() + public async Task MinAsync_Selector_Int32_16() { var input = new int[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -780,14 +780,14 @@ public async Task Min_Selector_Int32_16() } [Fact] - public async Task Min_AsyncSelector_Int32_16() + public async Task MinAwaitAsync_Selector_Int32_16() { var input = new int[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -796,14 +796,14 @@ public async Task Min_AsyncSelector_Int32_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_16() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_16() { var input = new int[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -812,7 +812,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_16() #endif [Fact] - public async Task Min_Int32_Nullable_16_NoNull() + public async Task MinAsync_Int32_Nullable_16_NoNull() { var input = new int?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -827,7 +827,7 @@ public async Task Min_Int32_Nullable_16_NoNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_16_NoNull() + public async Task MinAsync_Selector_Int32_Nullable_16_NoNull() { var input = new int?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -842,14 +842,14 @@ public async Task Min_Selector_Int32_Nullable_16_NoNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_16_NoNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_16_NoNull() { var input = new int?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -858,14 +858,14 @@ public async Task Min_AsyncSelector_Int32_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_16_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_16_NoNull() { var input = new int?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -874,7 +874,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_16_NoNull() #endif [Fact] - public async Task Min_Int32_Nullable_16_AllNull() + public async Task MinAsync_Int32_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(int?), 16); @@ -884,7 +884,7 @@ public async Task Min_Int32_Nullable_16_AllNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_16_AllNull() + public async Task MinAsync_Selector_Int32_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(int?), 16); @@ -894,29 +894,29 @@ public async Task Min_Selector_Int32_Nullable_16_AllNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_16_AllNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(int?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_16_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(int?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Int32_Nullable_16_SomeNull() + public async Task MinAsync_Int32_Nullable_16_SomeNull() { var input = new int?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -931,7 +931,7 @@ public async Task Min_Int32_Nullable_16_SomeNull() } [Fact] - public async Task Min_Selector_Int32_Nullable_16_SomeNull() + public async Task MinAsync_Selector_Int32_Nullable_16_SomeNull() { var input = new int?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -946,14 +946,14 @@ public async Task Min_Selector_Int32_Nullable_16_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Int32_Nullable_16_SomeNull() + public async Task MinAwaitAsync_Selector_Int32_Nullable_16_SomeNull() { var input = new int?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -962,14 +962,14 @@ public async Task Min_AsyncSelector_Int32_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_16_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int32_Nullable_16_SomeNull() { var input = new int?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -978,59 +978,59 @@ public async Task Min_AsyncSelectorWithCancellation_Int32_Nullable_16_SomeNull() #endif [Fact] - public async Task Min_Empty_Int64() + public async Task MinAsync_Empty_Int64() { await AssertThrowsAsync(new long[0].ToAsyncEnumerable().MinAsync(CancellationToken.None).AsTask()); } [Fact] - public async Task Min_Selector_Empty_Int64() + public async Task MinAsync_Selector_Empty_Int64() { await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync(_ => default(long), CancellationToken.None).AsTask()); } [Fact] - public async Task Min_AsyncSelector_Empty_Int64() + public async Task MinAwaitAsync_Selector_Empty_Int64() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAwaitAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Empty_Int64() + public async Task MinAwaitWithCancellationAsync_Selector_Empty_Int64() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); } #endif [Fact] - public async Task Min_Empty_Nullable_Int64() + public async Task MinAsync_Empty_Nullable_Int64() { Assert.Null(await new long?[0].ToAsyncEnumerable().MinAsync(CancellationToken.None)); } [Fact] - public async Task Min_Selector_Empty_Nullable_Int64() + public async Task MinAsync_Selector_Empty_Nullable_Int64() { Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync(_ => default(long?), CancellationToken.None)); } [Fact] - public async Task Min_AsyncSelector_Empty_Nullable_Int64() + public async Task MinAwaitAsync_Selector_Empty_Nullable_Int64() { - Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync(_ => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MinAwaitAsync(_ => default(ValueTask), CancellationToken.None)); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Empty_Nullable_Int64() + public async Task MinAwaitWithCancellationAsync_Selector_Empty_Nullable_Int64() { - Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync((x, ct) => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None)); } #endif [Fact] - public async Task Min_Int64_1() + public async Task MinAsync_Int64_1() { var input = new long[] { 33 }.AsEnumerable(); @@ -1045,7 +1045,7 @@ public async Task Min_Int64_1() } [Fact] - public async Task Min_Selector_Int64_1() + public async Task MinAsync_Selector_Int64_1() { var input = new long[] { 33 }.AsEnumerable(); @@ -1060,14 +1060,14 @@ public async Task Min_Selector_Int64_1() } [Fact] - public async Task Min_AsyncSelector_Int64_1() + public async Task MinAwaitAsync_Selector_Int64_1() { var input = new long[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1076,14 +1076,14 @@ public async Task Min_AsyncSelector_Int64_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_1() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_1() { var input = new long[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1092,7 +1092,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_1() #endif [Fact] - public async Task Min_Int64_Nullable_1_NoNull() + public async Task MinAsync_Int64_Nullable_1_NoNull() { var input = new long?[] { 33 }.AsEnumerable(); @@ -1107,7 +1107,7 @@ public async Task Min_Int64_Nullable_1_NoNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_1_NoNull() + public async Task MinAsync_Selector_Int64_Nullable_1_NoNull() { var input = new long?[] { 33 }.AsEnumerable(); @@ -1122,14 +1122,14 @@ public async Task Min_Selector_Int64_Nullable_1_NoNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_1_NoNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_1_NoNull() { var input = new long?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1138,14 +1138,14 @@ public async Task Min_AsyncSelector_Int64_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_1_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_1_NoNull() { var input = new long?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1154,7 +1154,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_1_NoNull() #endif [Fact] - public async Task Min_Int64_Nullable_1_AllNull() + public async Task MinAsync_Int64_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(long?), 1); @@ -1164,7 +1164,7 @@ public async Task Min_Int64_Nullable_1_AllNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_1_AllNull() + public async Task MinAsync_Selector_Int64_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(long?), 1); @@ -1174,29 +1174,29 @@ public async Task Min_Selector_Int64_Nullable_1_AllNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_1_AllNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(long?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_1_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(long?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Int64_Nullable_1_SomeNull() + public async Task MinAsync_Int64_Nullable_1_SomeNull() { var input = new long?[] { 33 }.AsEnumerable(); @@ -1211,7 +1211,7 @@ public async Task Min_Int64_Nullable_1_SomeNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_1_SomeNull() + public async Task MinAsync_Selector_Int64_Nullable_1_SomeNull() { var input = new long?[] { 33 }.AsEnumerable(); @@ -1226,14 +1226,14 @@ public async Task Min_Selector_Int64_Nullable_1_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_1_SomeNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_1_SomeNull() { var input = new long?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1242,14 +1242,14 @@ public async Task Min_AsyncSelector_Int64_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_1_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_1_SomeNull() { var input = new long?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1258,7 +1258,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_1_SomeNull() #endif [Fact] - public async Task Min_Int64_4() + public async Task MinAsync_Int64_4() { var input = new long[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -1273,7 +1273,7 @@ public async Task Min_Int64_4() } [Fact] - public async Task Min_Selector_Int64_4() + public async Task MinAsync_Selector_Int64_4() { var input = new long[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -1288,14 +1288,14 @@ public async Task Min_Selector_Int64_4() } [Fact] - public async Task Min_AsyncSelector_Int64_4() + public async Task MinAwaitAsync_Selector_Int64_4() { var input = new long[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1304,14 +1304,14 @@ public async Task Min_AsyncSelector_Int64_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_4() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_4() { var input = new long[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1320,7 +1320,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_4() #endif [Fact] - public async Task Min_Int64_Nullable_4_NoNull() + public async Task MinAsync_Int64_Nullable_4_NoNull() { var input = new long?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -1335,7 +1335,7 @@ public async Task Min_Int64_Nullable_4_NoNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_4_NoNull() + public async Task MinAsync_Selector_Int64_Nullable_4_NoNull() { var input = new long?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -1350,14 +1350,14 @@ public async Task Min_Selector_Int64_Nullable_4_NoNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_4_NoNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_4_NoNull() { var input = new long?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1366,14 +1366,14 @@ public async Task Min_AsyncSelector_Int64_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_4_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_4_NoNull() { var input = new long?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1382,7 +1382,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_4_NoNull() #endif [Fact] - public async Task Min_Int64_Nullable_4_AllNull() + public async Task MinAsync_Int64_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(long?), 4); @@ -1392,7 +1392,7 @@ public async Task Min_Int64_Nullable_4_AllNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_4_AllNull() + public async Task MinAsync_Selector_Int64_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(long?), 4); @@ -1402,29 +1402,29 @@ public async Task Min_Selector_Int64_Nullable_4_AllNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_4_AllNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(long?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_4_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(long?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Int64_Nullable_4_SomeNull() + public async Task MinAsync_Int64_Nullable_4_SomeNull() { var input = new long?[] { -2, null, -61, null }.AsEnumerable(); @@ -1439,7 +1439,7 @@ public async Task Min_Int64_Nullable_4_SomeNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_4_SomeNull() + public async Task MinAsync_Selector_Int64_Nullable_4_SomeNull() { var input = new long?[] { -2, null, -61, null }.AsEnumerable(); @@ -1454,14 +1454,14 @@ public async Task Min_Selector_Int64_Nullable_4_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_4_SomeNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_4_SomeNull() { var input = new long?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1470,14 +1470,14 @@ public async Task Min_AsyncSelector_Int64_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_4_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_4_SomeNull() { var input = new long?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1486,7 +1486,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_4_SomeNull() #endif [Fact] - public async Task Min_Int64_8() + public async Task MinAsync_Int64_8() { var input = new long[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -1501,7 +1501,7 @@ public async Task Min_Int64_8() } [Fact] - public async Task Min_Selector_Int64_8() + public async Task MinAsync_Selector_Int64_8() { var input = new long[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -1516,14 +1516,14 @@ public async Task Min_Selector_Int64_8() } [Fact] - public async Task Min_AsyncSelector_Int64_8() + public async Task MinAwaitAsync_Selector_Int64_8() { var input = new long[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1532,14 +1532,14 @@ public async Task Min_AsyncSelector_Int64_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_8() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_8() { var input = new long[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1548,7 +1548,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_8() #endif [Fact] - public async Task Min_Int64_Nullable_8_NoNull() + public async Task MinAsync_Int64_Nullable_8_NoNull() { var input = new long?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -1563,7 +1563,7 @@ public async Task Min_Int64_Nullable_8_NoNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_8_NoNull() + public async Task MinAsync_Selector_Int64_Nullable_8_NoNull() { var input = new long?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -1578,14 +1578,14 @@ public async Task Min_Selector_Int64_Nullable_8_NoNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_8_NoNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_8_NoNull() { var input = new long?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1594,14 +1594,14 @@ public async Task Min_AsyncSelector_Int64_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_8_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_8_NoNull() { var input = new long?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1610,7 +1610,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_8_NoNull() #endif [Fact] - public async Task Min_Int64_Nullable_8_AllNull() + public async Task MinAsync_Int64_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(long?), 8); @@ -1620,7 +1620,7 @@ public async Task Min_Int64_Nullable_8_AllNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_8_AllNull() + public async Task MinAsync_Selector_Int64_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(long?), 8); @@ -1630,29 +1630,29 @@ public async Task Min_Selector_Int64_Nullable_8_AllNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_8_AllNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(long?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_8_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(long?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Int64_Nullable_8_SomeNull() + public async Task MinAsync_Int64_Nullable_8_SomeNull() { var input = new long?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -1667,7 +1667,7 @@ public async Task Min_Int64_Nullable_8_SomeNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_8_SomeNull() + public async Task MinAsync_Selector_Int64_Nullable_8_SomeNull() { var input = new long?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -1682,14 +1682,14 @@ public async Task Min_Selector_Int64_Nullable_8_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_8_SomeNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_8_SomeNull() { var input = new long?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1698,14 +1698,14 @@ public async Task Min_AsyncSelector_Int64_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_8_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_8_SomeNull() { var input = new long?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1714,7 +1714,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_8_SomeNull() #endif [Fact] - public async Task Min_Int64_16() + public async Task MinAsync_Int64_16() { var input = new long[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -1729,7 +1729,7 @@ public async Task Min_Int64_16() } [Fact] - public async Task Min_Selector_Int64_16() + public async Task MinAsync_Selector_Int64_16() { var input = new long[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -1744,14 +1744,14 @@ public async Task Min_Selector_Int64_16() } [Fact] - public async Task Min_AsyncSelector_Int64_16() + public async Task MinAwaitAsync_Selector_Int64_16() { var input = new long[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1760,14 +1760,14 @@ public async Task Min_AsyncSelector_Int64_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_16() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_16() { var input = new long[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1776,7 +1776,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_16() #endif [Fact] - public async Task Min_Int64_Nullable_16_NoNull() + public async Task MinAsync_Int64_Nullable_16_NoNull() { var input = new long?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -1791,7 +1791,7 @@ public async Task Min_Int64_Nullable_16_NoNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_16_NoNull() + public async Task MinAsync_Selector_Int64_Nullable_16_NoNull() { var input = new long?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -1806,14 +1806,14 @@ public async Task Min_Selector_Int64_Nullable_16_NoNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_16_NoNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_16_NoNull() { var input = new long?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1822,14 +1822,14 @@ public async Task Min_AsyncSelector_Int64_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_16_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_16_NoNull() { var input = new long?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1838,7 +1838,7 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_16_NoNull() #endif [Fact] - public async Task Min_Int64_Nullable_16_AllNull() + public async Task MinAsync_Int64_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(long?), 16); @@ -1848,7 +1848,7 @@ public async Task Min_Int64_Nullable_16_AllNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_16_AllNull() + public async Task MinAsync_Selector_Int64_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(long?), 16); @@ -1858,29 +1858,29 @@ public async Task Min_Selector_Int64_Nullable_16_AllNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_16_AllNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(long?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_16_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(long?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Int64_Nullable_16_SomeNull() + public async Task MinAsync_Int64_Nullable_16_SomeNull() { var input = new long?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -1895,7 +1895,7 @@ public async Task Min_Int64_Nullable_16_SomeNull() } [Fact] - public async Task Min_Selector_Int64_Nullable_16_SomeNull() + public async Task MinAsync_Selector_Int64_Nullable_16_SomeNull() { var input = new long?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -1910,14 +1910,14 @@ public async Task Min_Selector_Int64_Nullable_16_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Int64_Nullable_16_SomeNull() + public async Task MinAwaitAsync_Selector_Int64_Nullable_16_SomeNull() { var input = new long?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1926,14 +1926,14 @@ public async Task Min_AsyncSelector_Int64_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_16_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Int64_Nullable_16_SomeNull() { var input = new long?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -1942,59 +1942,59 @@ public async Task Min_AsyncSelectorWithCancellation_Int64_Nullable_16_SomeNull() #endif [Fact] - public async Task Min_Empty_Single() + public async Task MinAsync_Empty_Single() { await AssertThrowsAsync(new float[0].ToAsyncEnumerable().MinAsync(CancellationToken.None).AsTask()); } [Fact] - public async Task Min_Selector_Empty_Single() + public async Task MinAsync_Selector_Empty_Single() { await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync(_ => default(float), CancellationToken.None).AsTask()); } [Fact] - public async Task Min_AsyncSelector_Empty_Single() + public async Task MinAwaitAsync_Selector_Empty_Single() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAwaitAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Empty_Single() + public async Task MinAwaitWithCancellationAsync_Selector_Empty_Single() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); } #endif [Fact] - public async Task Min_Empty_Nullable_Single() + public async Task MinAsync_Empty_Nullable_Single() { Assert.Null(await new float?[0].ToAsyncEnumerable().MinAsync(CancellationToken.None)); } [Fact] - public async Task Min_Selector_Empty_Nullable_Single() + public async Task MinAsync_Selector_Empty_Nullable_Single() { Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync(_ => default(float?), CancellationToken.None)); } [Fact] - public async Task Min_AsyncSelector_Empty_Nullable_Single() + public async Task MinAwaitAsync_Selector_Empty_Nullable_Single() { - Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync(_ => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MinAwaitAsync(_ => default(ValueTask), CancellationToken.None)); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Empty_Nullable_Single() + public async Task MinAwaitWithCancellationAsync_Selector_Empty_Nullable_Single() { - Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync((x, ct) => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None)); } #endif [Fact] - public async Task Min_Single_1() + public async Task MinAsync_Single_1() { var input = new float[] { 33 }.AsEnumerable(); @@ -2009,7 +2009,7 @@ public async Task Min_Single_1() } [Fact] - public async Task Min_Selector_Single_1() + public async Task MinAsync_Selector_Single_1() { var input = new float[] { 33 }.AsEnumerable(); @@ -2024,14 +2024,14 @@ public async Task Min_Selector_Single_1() } [Fact] - public async Task Min_AsyncSelector_Single_1() + public async Task MinAwaitAsync_Selector_Single_1() { var input = new float[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2040,14 +2040,14 @@ public async Task Min_AsyncSelector_Single_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_1() + public async Task MinAwaitWithCancellationAsync_Selector_Single_1() { var input = new float[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2056,7 +2056,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_1() #endif [Fact] - public async Task Min_Single_Nullable_1_NoNull() + public async Task MinAsync_Single_Nullable_1_NoNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -2071,7 +2071,7 @@ public async Task Min_Single_Nullable_1_NoNull() } [Fact] - public async Task Min_Selector_Single_Nullable_1_NoNull() + public async Task MinAsync_Selector_Single_Nullable_1_NoNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -2086,14 +2086,14 @@ public async Task Min_Selector_Single_Nullable_1_NoNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_1_NoNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_1_NoNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2102,14 +2102,14 @@ public async Task Min_AsyncSelector_Single_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_1_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_1_NoNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2118,7 +2118,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_1_NoNull() #endif [Fact] - public async Task Min_Single_Nullable_1_AllNull() + public async Task MinAsync_Single_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); @@ -2128,7 +2128,7 @@ public async Task Min_Single_Nullable_1_AllNull() } [Fact] - public async Task Min_Selector_Single_Nullable_1_AllNull() + public async Task MinAsync_Selector_Single_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); @@ -2138,29 +2138,29 @@ public async Task Min_Selector_Single_Nullable_1_AllNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_1_AllNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_1_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_Nullable_1_SomeNull() + public async Task MinAsync_Single_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -2175,7 +2175,7 @@ public async Task Min_Single_Nullable_1_SomeNull() } [Fact] - public async Task Min_Selector_Single_Nullable_1_SomeNull() + public async Task MinAsync_Selector_Single_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -2190,14 +2190,14 @@ public async Task Min_Selector_Single_Nullable_1_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_1_SomeNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2206,14 +2206,14 @@ public async Task Min_AsyncSelector_Single_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_1_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2222,7 +2222,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_1_SomeNull() #endif [Fact] - public async Task Min_Single_4() + public async Task MinAsync_Single_4() { var input = new float[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -2237,7 +2237,7 @@ public async Task Min_Single_4() } [Fact] - public async Task Min_Selector_Single_4() + public async Task MinAsync_Selector_Single_4() { var input = new float[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -2252,14 +2252,14 @@ public async Task Min_Selector_Single_4() } [Fact] - public async Task Min_AsyncSelector_Single_4() + public async Task MinAwaitAsync_Selector_Single_4() { var input = new float[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2268,14 +2268,14 @@ public async Task Min_AsyncSelector_Single_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_4() + public async Task MinAwaitWithCancellationAsync_Selector_Single_4() { var input = new float[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2284,7 +2284,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_4() #endif [Fact] - public async Task Min_Single_Nullable_4_NoNull() + public async Task MinAsync_Single_Nullable_4_NoNull() { var input = new float?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -2299,7 +2299,7 @@ public async Task Min_Single_Nullable_4_NoNull() } [Fact] - public async Task Min_Selector_Single_Nullable_4_NoNull() + public async Task MinAsync_Selector_Single_Nullable_4_NoNull() { var input = new float?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -2314,14 +2314,14 @@ public async Task Min_Selector_Single_Nullable_4_NoNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_4_NoNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_4_NoNull() { var input = new float?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2330,14 +2330,14 @@ public async Task Min_AsyncSelector_Single_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_4_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_4_NoNull() { var input = new float?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2346,7 +2346,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_4_NoNull() #endif [Fact] - public async Task Min_Single_Nullable_4_AllNull() + public async Task MinAsync_Single_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); @@ -2356,7 +2356,7 @@ public async Task Min_Single_Nullable_4_AllNull() } [Fact] - public async Task Min_Selector_Single_Nullable_4_AllNull() + public async Task MinAsync_Selector_Single_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); @@ -2366,29 +2366,29 @@ public async Task Min_Selector_Single_Nullable_4_AllNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_4_AllNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_4_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_Nullable_4_SomeNull() + public async Task MinAsync_Single_Nullable_4_SomeNull() { var input = new float?[] { -2, null, -61, null }.AsEnumerable(); @@ -2403,7 +2403,7 @@ public async Task Min_Single_Nullable_4_SomeNull() } [Fact] - public async Task Min_Selector_Single_Nullable_4_SomeNull() + public async Task MinAsync_Selector_Single_Nullable_4_SomeNull() { var input = new float?[] { -2, null, -61, null }.AsEnumerable(); @@ -2418,14 +2418,14 @@ public async Task Min_Selector_Single_Nullable_4_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_4_SomeNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_4_SomeNull() { var input = new float?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2434,14 +2434,14 @@ public async Task Min_AsyncSelector_Single_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_4_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_4_SomeNull() { var input = new float?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2450,7 +2450,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_4_SomeNull() #endif [Fact] - public async Task Min_Single_8() + public async Task MinAsync_Single_8() { var input = new float[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -2465,7 +2465,7 @@ public async Task Min_Single_8() } [Fact] - public async Task Min_Selector_Single_8() + public async Task MinAsync_Selector_Single_8() { var input = new float[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -2480,14 +2480,14 @@ public async Task Min_Selector_Single_8() } [Fact] - public async Task Min_AsyncSelector_Single_8() + public async Task MinAwaitAsync_Selector_Single_8() { var input = new float[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2496,14 +2496,14 @@ public async Task Min_AsyncSelector_Single_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_8() + public async Task MinAwaitWithCancellationAsync_Selector_Single_8() { var input = new float[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2512,7 +2512,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_8() #endif [Fact] - public async Task Min_Single_Nullable_8_NoNull() + public async Task MinAsync_Single_Nullable_8_NoNull() { var input = new float?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -2527,7 +2527,7 @@ public async Task Min_Single_Nullable_8_NoNull() } [Fact] - public async Task Min_Selector_Single_Nullable_8_NoNull() + public async Task MinAsync_Selector_Single_Nullable_8_NoNull() { var input = new float?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -2542,14 +2542,14 @@ public async Task Min_Selector_Single_Nullable_8_NoNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_8_NoNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_8_NoNull() { var input = new float?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2558,14 +2558,14 @@ public async Task Min_AsyncSelector_Single_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_8_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_8_NoNull() { var input = new float?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2574,7 +2574,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_8_NoNull() #endif [Fact] - public async Task Min_Single_Nullable_8_AllNull() + public async Task MinAsync_Single_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); @@ -2584,7 +2584,7 @@ public async Task Min_Single_Nullable_8_AllNull() } [Fact] - public async Task Min_Selector_Single_Nullable_8_AllNull() + public async Task MinAsync_Selector_Single_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); @@ -2594,29 +2594,29 @@ public async Task Min_Selector_Single_Nullable_8_AllNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_8_AllNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_8_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_Nullable_8_SomeNull() + public async Task MinAsync_Single_Nullable_8_SomeNull() { var input = new float?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -2631,7 +2631,7 @@ public async Task Min_Single_Nullable_8_SomeNull() } [Fact] - public async Task Min_Selector_Single_Nullable_8_SomeNull() + public async Task MinAsync_Selector_Single_Nullable_8_SomeNull() { var input = new float?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -2646,14 +2646,14 @@ public async Task Min_Selector_Single_Nullable_8_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_8_SomeNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_8_SomeNull() { var input = new float?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2662,14 +2662,14 @@ public async Task Min_AsyncSelector_Single_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_8_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_8_SomeNull() { var input = new float?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2678,7 +2678,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_8_SomeNull() #endif [Fact] - public async Task Min_Single_16() + public async Task MinAsync_Single_16() { var input = new float[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -2693,7 +2693,7 @@ public async Task Min_Single_16() } [Fact] - public async Task Min_Selector_Single_16() + public async Task MinAsync_Selector_Single_16() { var input = new float[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -2708,14 +2708,14 @@ public async Task Min_Selector_Single_16() } [Fact] - public async Task Min_AsyncSelector_Single_16() + public async Task MinAwaitAsync_Selector_Single_16() { var input = new float[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2724,14 +2724,14 @@ public async Task Min_AsyncSelector_Single_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_16() + public async Task MinAwaitWithCancellationAsync_Selector_Single_16() { var input = new float[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2740,7 +2740,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_16() #endif [Fact] - public async Task Min_Single_Nullable_16_NoNull() + public async Task MinAsync_Single_Nullable_16_NoNull() { var input = new float?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -2755,7 +2755,7 @@ public async Task Min_Single_Nullable_16_NoNull() } [Fact] - public async Task Min_Selector_Single_Nullable_16_NoNull() + public async Task MinAsync_Selector_Single_Nullable_16_NoNull() { var input = new float?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -2770,14 +2770,14 @@ public async Task Min_Selector_Single_Nullable_16_NoNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_16_NoNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_16_NoNull() { var input = new float?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2786,14 +2786,14 @@ public async Task Min_AsyncSelector_Single_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_16_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_16_NoNull() { var input = new float?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2802,7 +2802,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_16_NoNull() #endif [Fact] - public async Task Min_Single_Nullable_16_AllNull() + public async Task MinAsync_Single_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); @@ -2812,7 +2812,7 @@ public async Task Min_Single_Nullable_16_AllNull() } [Fact] - public async Task Min_Selector_Single_Nullable_16_AllNull() + public async Task MinAsync_Selector_Single_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); @@ -2822,29 +2822,29 @@ public async Task Min_Selector_Single_Nullable_16_AllNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_16_AllNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_16_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_Nullable_16_SomeNull() + public async Task MinAsync_Single_Nullable_16_SomeNull() { var input = new float?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -2859,7 +2859,7 @@ public async Task Min_Single_Nullable_16_SomeNull() } [Fact] - public async Task Min_Selector_Single_Nullable_16_SomeNull() + public async Task MinAsync_Selector_Single_Nullable_16_SomeNull() { var input = new float?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -2874,14 +2874,14 @@ public async Task Min_Selector_Single_Nullable_16_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Single_Nullable_16_SomeNull() + public async Task MinAwaitAsync_Selector_Single_Nullable_16_SomeNull() { var input = new float?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2890,14 +2890,14 @@ public async Task Min_AsyncSelector_Single_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_16_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_Nullable_16_SomeNull() { var input = new float?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2906,7 +2906,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_Nullable_16_SomeNull( #endif [Fact] - public async Task Min_Single_WithNaN_1() + public async Task MinAsync_Single_WithNaN_1() { var input = new float[] { float.NaN }.AsEnumerable(); @@ -2921,7 +2921,7 @@ public async Task Min_Single_WithNaN_1() } [Fact] - public async Task Min_Selector_Single_WithNaN_1() + public async Task MinAsync_Selector_Single_WithNaN_1() { var input = new float[] { float.NaN }.AsEnumerable(); @@ -2936,14 +2936,14 @@ public async Task Min_Selector_Single_WithNaN_1() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_1() + public async Task MinAwaitAsync_Selector_Single_WithNaN_1() { var input = new float[] { float.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2952,14 +2952,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_1() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_1() { var input = new float[] { float.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -2968,7 +2968,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_1() #endif [Fact] - public async Task Min_Single_WithNaN_1_AllNaN() + public async Task MinAsync_Single_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); @@ -2978,7 +2978,7 @@ public async Task Min_Single_WithNaN_1_AllNaN() } [Fact] - public async Task Min_Selector_Single_WithNaN_1_AllNaN() + public async Task MinAsync_Selector_Single_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); @@ -2988,29 +2988,29 @@ public async Task Min_Selector_Single_WithNaN_1_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_1_AllNaN() + public async Task MinAwaitAsync_Selector_Single_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_1_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_1_NoNull() + public async Task MinAsync_Single_WithNaN_Nullable_1_NoNull() { var input = new float?[] { float.NaN }.AsEnumerable(); @@ -3025,7 +3025,7 @@ public async Task Min_Single_WithNaN_Nullable_1_NoNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_1_NoNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_1_NoNull() { var input = new float?[] { float.NaN }.AsEnumerable(); @@ -3040,14 +3040,14 @@ public async Task Min_Selector_Single_WithNaN_Nullable_1_NoNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_1_NoNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_1_NoNull() { var input = new float?[] { float.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3056,14 +3056,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_1_NoNull() { var input = new float?[] { float.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3072,7 +3072,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_No #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_1_AllNull() + public async Task MinAsync_Single_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); @@ -3082,7 +3082,7 @@ public async Task Min_Single_WithNaN_Nullable_1_AllNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_1_AllNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); @@ -3092,29 +3092,29 @@ public async Task Min_Selector_Single_WithNaN_Nullable_1_AllNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_1_AllNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_1_AllNaN() + public async Task MinAsync_Single_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); @@ -3124,7 +3124,7 @@ public async Task Min_Single_WithNaN_Nullable_1_AllNaN() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_1_AllNaN() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); @@ -3134,29 +3134,29 @@ public async Task Min_Selector_Single_WithNaN_Nullable_1_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_1_AllNaN() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_1_SomeNull() + public async Task MinAsync_Single_WithNaN_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -3171,7 +3171,7 @@ public async Task Min_Single_WithNaN_Nullable_1_SomeNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_1_SomeNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -3186,14 +3186,14 @@ public async Task Min_Selector_Single_WithNaN_Nullable_1_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_1_SomeNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3202,14 +3202,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3217,7 +3217,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_So } #endif [Fact] - public async Task Min_Single_WithNaN_4() + public async Task MinAsync_Single_WithNaN_4() { var input = new float[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); @@ -3232,7 +3232,7 @@ public async Task Min_Single_WithNaN_4() } [Fact] - public async Task Min_Selector_Single_WithNaN_4() + public async Task MinAsync_Selector_Single_WithNaN_4() { var input = new float[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); @@ -3247,14 +3247,14 @@ public async Task Min_Selector_Single_WithNaN_4() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_4() + public async Task MinAwaitAsync_Selector_Single_WithNaN_4() { var input = new float[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3263,14 +3263,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_4() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_4() { var input = new float[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3279,7 +3279,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_4() #endif [Fact] - public async Task Min_Single_WithNaN_4_AllNaN() + public async Task MinAsync_Single_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); @@ -3289,7 +3289,7 @@ public async Task Min_Single_WithNaN_4_AllNaN() } [Fact] - public async Task Min_Selector_Single_WithNaN_4_AllNaN() + public async Task MinAsync_Selector_Single_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); @@ -3299,29 +3299,29 @@ public async Task Min_Selector_Single_WithNaN_4_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_4_AllNaN() + public async Task MinAwaitAsync_Selector_Single_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_4_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_4_NoNull() + public async Task MinAsync_Single_WithNaN_Nullable_4_NoNull() { var input = new float?[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); @@ -3336,7 +3336,7 @@ public async Task Min_Single_WithNaN_Nullable_4_NoNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_4_NoNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_4_NoNull() { var input = new float?[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); @@ -3351,14 +3351,14 @@ public async Task Min_Selector_Single_WithNaN_Nullable_4_NoNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_4_NoNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_4_NoNull() { var input = new float?[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3367,14 +3367,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_4_NoNull() { var input = new float?[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3383,7 +3383,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_No #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_4_AllNull() + public async Task MinAsync_Single_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); @@ -3393,7 +3393,7 @@ public async Task Min_Single_WithNaN_Nullable_4_AllNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_4_AllNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); @@ -3403,29 +3403,29 @@ public async Task Min_Selector_Single_WithNaN_Nullable_4_AllNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_4_AllNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_4_AllNaN() + public async Task MinAsync_Single_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); @@ -3435,7 +3435,7 @@ public async Task Min_Single_WithNaN_Nullable_4_AllNaN() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_4_AllNaN() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); @@ -3445,29 +3445,29 @@ public async Task Min_Selector_Single_WithNaN_Nullable_4_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_4_AllNaN() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_4_SomeNull() + public async Task MinAsync_Single_WithNaN_Nullable_4_SomeNull() { var input = new float?[] { -2, null, float.NaN, -17 }.AsEnumerable(); @@ -3482,7 +3482,7 @@ public async Task Min_Single_WithNaN_Nullable_4_SomeNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_4_SomeNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_4_SomeNull() { var input = new float?[] { -2, null, float.NaN, -17 }.AsEnumerable(); @@ -3497,14 +3497,14 @@ public async Task Min_Selector_Single_WithNaN_Nullable_4_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_4_SomeNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_4_SomeNull() { var input = new float?[] { -2, null, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3513,14 +3513,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_4_SomeNull() { var input = new float?[] { -2, null, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3528,7 +3528,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_So } #endif [Fact] - public async Task Min_Single_WithNaN_8() + public async Task MinAsync_Single_WithNaN_8() { var input = new float[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); @@ -3543,7 +3543,7 @@ public async Task Min_Single_WithNaN_8() } [Fact] - public async Task Min_Selector_Single_WithNaN_8() + public async Task MinAsync_Selector_Single_WithNaN_8() { var input = new float[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); @@ -3558,14 +3558,14 @@ public async Task Min_Selector_Single_WithNaN_8() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_8() + public async Task MinAwaitAsync_Selector_Single_WithNaN_8() { var input = new float[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3574,14 +3574,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_8() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_8() { var input = new float[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3590,7 +3590,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_8() #endif [Fact] - public async Task Min_Single_WithNaN_8_AllNaN() + public async Task MinAsync_Single_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); @@ -3600,7 +3600,7 @@ public async Task Min_Single_WithNaN_8_AllNaN() } [Fact] - public async Task Min_Selector_Single_WithNaN_8_AllNaN() + public async Task MinAsync_Selector_Single_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); @@ -3610,29 +3610,29 @@ public async Task Min_Selector_Single_WithNaN_8_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_8_AllNaN() + public async Task MinAwaitAsync_Selector_Single_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_8_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_8_NoNull() + public async Task MinAsync_Single_WithNaN_Nullable_8_NoNull() { var input = new float?[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); @@ -3647,7 +3647,7 @@ public async Task Min_Single_WithNaN_Nullable_8_NoNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_8_NoNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_8_NoNull() { var input = new float?[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); @@ -3662,14 +3662,14 @@ public async Task Min_Selector_Single_WithNaN_Nullable_8_NoNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_8_NoNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_8_NoNull() { var input = new float?[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3678,14 +3678,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_8_NoNull() { var input = new float?[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3694,7 +3694,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_No #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_8_AllNull() + public async Task MinAsync_Single_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); @@ -3704,7 +3704,7 @@ public async Task Min_Single_WithNaN_Nullable_8_AllNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_8_AllNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); @@ -3714,29 +3714,29 @@ public async Task Min_Selector_Single_WithNaN_Nullable_8_AllNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_8_AllNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_8_AllNaN() + public async Task MinAsync_Single_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); @@ -3746,7 +3746,7 @@ public async Task Min_Single_WithNaN_Nullable_8_AllNaN() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_8_AllNaN() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); @@ -3756,29 +3756,29 @@ public async Task Min_Selector_Single_WithNaN_Nullable_8_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_8_AllNaN() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_8_SomeNull() + public async Task MinAsync_Single_WithNaN_Nullable_8_SomeNull() { var input = new float?[] { -48, null, float.NaN, -46, null, float.NaN, -10, null }.AsEnumerable(); @@ -3793,7 +3793,7 @@ public async Task Min_Single_WithNaN_Nullable_8_SomeNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_8_SomeNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_8_SomeNull() { var input = new float?[] { -48, null, float.NaN, -46, null, float.NaN, -10, null }.AsEnumerable(); @@ -3808,14 +3808,14 @@ public async Task Min_Selector_Single_WithNaN_Nullable_8_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_8_SomeNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_8_SomeNull() { var input = new float?[] { -48, null, float.NaN, -46, null, float.NaN, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3824,14 +3824,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_8_SomeNull() { var input = new float?[] { -48, null, float.NaN, -46, null, float.NaN, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3839,7 +3839,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_So } #endif [Fact] - public async Task Min_Single_WithNaN_16() + public async Task MinAsync_Single_WithNaN_16() { var input = new float[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); @@ -3854,7 +3854,7 @@ public async Task Min_Single_WithNaN_16() } [Fact] - public async Task Min_Selector_Single_WithNaN_16() + public async Task MinAsync_Selector_Single_WithNaN_16() { var input = new float[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); @@ -3869,14 +3869,14 @@ public async Task Min_Selector_Single_WithNaN_16() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_16() + public async Task MinAwaitAsync_Selector_Single_WithNaN_16() { var input = new float[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3885,14 +3885,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_16() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_16() { var input = new float[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3901,7 +3901,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_16() #endif [Fact] - public async Task Min_Single_WithNaN_16_AllNaN() + public async Task MinAsync_Single_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); @@ -3911,7 +3911,7 @@ public async Task Min_Single_WithNaN_16_AllNaN() } [Fact] - public async Task Min_Selector_Single_WithNaN_16_AllNaN() + public async Task MinAsync_Selector_Single_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); @@ -3921,29 +3921,29 @@ public async Task Min_Selector_Single_WithNaN_16_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_16_AllNaN() + public async Task MinAwaitAsync_Selector_Single_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_16_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_16_NoNull() + public async Task MinAsync_Single_WithNaN_Nullable_16_NoNull() { var input = new float?[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); @@ -3958,7 +3958,7 @@ public async Task Min_Single_WithNaN_Nullable_16_NoNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_16_NoNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_16_NoNull() { var input = new float?[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); @@ -3973,14 +3973,14 @@ public async Task Min_Selector_Single_WithNaN_Nullable_16_NoNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_16_NoNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_16_NoNull() { var input = new float?[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -3989,14 +3989,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_16_NoNull() { var input = new float?[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4005,7 +4005,7 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_N #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_16_AllNull() + public async Task MinAsync_Single_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); @@ -4015,7 +4015,7 @@ public async Task Min_Single_WithNaN_Nullable_16_AllNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_16_AllNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); @@ -4025,29 +4025,29 @@ public async Task Min_Selector_Single_WithNaN_Nullable_16_AllNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_16_AllNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_16_AllNaN() + public async Task MinAsync_Single_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); @@ -4057,7 +4057,7 @@ public async Task Min_Single_WithNaN_Nullable_16_AllNaN() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_16_AllNaN() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); @@ -4067,29 +4067,29 @@ public async Task Min_Selector_Single_WithNaN_Nullable_16_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_16_AllNaN() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Single_WithNaN_Nullable_16_SomeNull() + public async Task MinAsync_Single_WithNaN_Nullable_16_SomeNull() { var input = new float?[] { 59, null, float.NaN, 98, null, float.NaN, -100, null, float.NaN, -86, null, float.NaN, 19, null, float.NaN, 41 }.AsEnumerable(); @@ -4104,7 +4104,7 @@ public async Task Min_Single_WithNaN_Nullable_16_SomeNull() } [Fact] - public async Task Min_Selector_Single_WithNaN_Nullable_16_SomeNull() + public async Task MinAsync_Selector_Single_WithNaN_Nullable_16_SomeNull() { var input = new float?[] { 59, null, float.NaN, 98, null, float.NaN, -100, null, float.NaN, -86, null, float.NaN, 19, null, float.NaN, 41 }.AsEnumerable(); @@ -4119,14 +4119,14 @@ public async Task Min_Selector_Single_WithNaN_Nullable_16_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Single_WithNaN_Nullable_16_SomeNull() + public async Task MinAwaitAsync_Selector_Single_WithNaN_Nullable_16_SomeNull() { var input = new float?[] { 59, null, float.NaN, 98, null, float.NaN, -100, null, float.NaN, -86, null, float.NaN, 19, null, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4135,14 +4135,14 @@ public async Task Min_AsyncSelector_Single_WithNaN_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_16_SomeNull() { var input = new float?[] { 59, null, float.NaN, 98, null, float.NaN, -100, null, float.NaN, -86, null, float.NaN, 19, null, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4150,59 +4150,59 @@ public async Task Min_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_S } #endif [Fact] - public async Task Min_Empty_Double() + public async Task MinAsync_Empty_Double() { await AssertThrowsAsync(new double[0].ToAsyncEnumerable().MinAsync(CancellationToken.None).AsTask()); } [Fact] - public async Task Min_Selector_Empty_Double() + public async Task MinAsync_Selector_Empty_Double() { await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync(_ => default(double), CancellationToken.None).AsTask()); } [Fact] - public async Task Min_AsyncSelector_Empty_Double() + public async Task MinAwaitAsync_Selector_Empty_Double() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAwaitAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Empty_Double() + public async Task MinAwaitWithCancellationAsync_Selector_Empty_Double() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); } #endif [Fact] - public async Task Min_Empty_Nullable_Double() + public async Task MinAsync_Empty_Nullable_Double() { Assert.Null(await new double?[0].ToAsyncEnumerable().MinAsync(CancellationToken.None)); } [Fact] - public async Task Min_Selector_Empty_Nullable_Double() + public async Task MinAsync_Selector_Empty_Nullable_Double() { Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync(_ => default(double?), CancellationToken.None)); } [Fact] - public async Task Min_AsyncSelector_Empty_Nullable_Double() + public async Task MinAwaitAsync_Selector_Empty_Nullable_Double() { - Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync(_ => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MinAwaitAsync(_ => default(ValueTask), CancellationToken.None)); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Empty_Nullable_Double() + public async Task MinAwaitWithCancellationAsync_Selector_Empty_Nullable_Double() { - Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync((x, ct) => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None)); } #endif [Fact] - public async Task Min_Double_1() + public async Task MinAsync_Double_1() { var input = new double[] { 33 }.AsEnumerable(); @@ -4217,7 +4217,7 @@ public async Task Min_Double_1() } [Fact] - public async Task Min_Selector_Double_1() + public async Task MinAsync_Selector_Double_1() { var input = new double[] { 33 }.AsEnumerable(); @@ -4232,14 +4232,14 @@ public async Task Min_Selector_Double_1() } [Fact] - public async Task Min_AsyncSelector_Double_1() + public async Task MinAwaitAsync_Selector_Double_1() { var input = new double[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4248,14 +4248,14 @@ public async Task Min_AsyncSelector_Double_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_1() + public async Task MinAwaitWithCancellationAsync_Selector_Double_1() { var input = new double[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4264,7 +4264,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_1() #endif [Fact] - public async Task Min_Double_Nullable_1_NoNull() + public async Task MinAsync_Double_Nullable_1_NoNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -4279,7 +4279,7 @@ public async Task Min_Double_Nullable_1_NoNull() } [Fact] - public async Task Min_Selector_Double_Nullable_1_NoNull() + public async Task MinAsync_Selector_Double_Nullable_1_NoNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -4294,14 +4294,14 @@ public async Task Min_Selector_Double_Nullable_1_NoNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_1_NoNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_1_NoNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4310,14 +4310,14 @@ public async Task Min_AsyncSelector_Double_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_1_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_1_NoNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4326,7 +4326,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_1_NoNull() #endif [Fact] - public async Task Min_Double_Nullable_1_AllNull() + public async Task MinAsync_Double_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); @@ -4336,7 +4336,7 @@ public async Task Min_Double_Nullable_1_AllNull() } [Fact] - public async Task Min_Selector_Double_Nullable_1_AllNull() + public async Task MinAsync_Selector_Double_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); @@ -4346,29 +4346,29 @@ public async Task Min_Selector_Double_Nullable_1_AllNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_1_AllNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_1_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_Nullable_1_SomeNull() + public async Task MinAsync_Double_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -4383,7 +4383,7 @@ public async Task Min_Double_Nullable_1_SomeNull() } [Fact] - public async Task Min_Selector_Double_Nullable_1_SomeNull() + public async Task MinAsync_Selector_Double_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -4398,14 +4398,14 @@ public async Task Min_Selector_Double_Nullable_1_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_1_SomeNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4414,14 +4414,14 @@ public async Task Min_AsyncSelector_Double_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_1_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4430,7 +4430,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_1_SomeNull() #endif [Fact] - public async Task Min_Double_4() + public async Task MinAsync_Double_4() { var input = new double[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -4445,7 +4445,7 @@ public async Task Min_Double_4() } [Fact] - public async Task Min_Selector_Double_4() + public async Task MinAsync_Selector_Double_4() { var input = new double[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -4460,14 +4460,14 @@ public async Task Min_Selector_Double_4() } [Fact] - public async Task Min_AsyncSelector_Double_4() + public async Task MinAwaitAsync_Selector_Double_4() { var input = new double[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4476,14 +4476,14 @@ public async Task Min_AsyncSelector_Double_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_4() + public async Task MinAwaitWithCancellationAsync_Selector_Double_4() { var input = new double[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4492,7 +4492,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_4() #endif [Fact] - public async Task Min_Double_Nullable_4_NoNull() + public async Task MinAsync_Double_Nullable_4_NoNull() { var input = new double?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -4507,7 +4507,7 @@ public async Task Min_Double_Nullable_4_NoNull() } [Fact] - public async Task Min_Selector_Double_Nullable_4_NoNull() + public async Task MinAsync_Selector_Double_Nullable_4_NoNull() { var input = new double?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -4522,14 +4522,14 @@ public async Task Min_Selector_Double_Nullable_4_NoNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_4_NoNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_4_NoNull() { var input = new double?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4538,14 +4538,14 @@ public async Task Min_AsyncSelector_Double_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_4_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_4_NoNull() { var input = new double?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4554,7 +4554,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_4_NoNull() #endif [Fact] - public async Task Min_Double_Nullable_4_AllNull() + public async Task MinAsync_Double_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); @@ -4564,7 +4564,7 @@ public async Task Min_Double_Nullable_4_AllNull() } [Fact] - public async Task Min_Selector_Double_Nullable_4_AllNull() + public async Task MinAsync_Selector_Double_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); @@ -4574,29 +4574,29 @@ public async Task Min_Selector_Double_Nullable_4_AllNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_4_AllNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_4_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_Nullable_4_SomeNull() + public async Task MinAsync_Double_Nullable_4_SomeNull() { var input = new double?[] { -2, null, -61, null }.AsEnumerable(); @@ -4611,7 +4611,7 @@ public async Task Min_Double_Nullable_4_SomeNull() } [Fact] - public async Task Min_Selector_Double_Nullable_4_SomeNull() + public async Task MinAsync_Selector_Double_Nullable_4_SomeNull() { var input = new double?[] { -2, null, -61, null }.AsEnumerable(); @@ -4626,14 +4626,14 @@ public async Task Min_Selector_Double_Nullable_4_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_4_SomeNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_4_SomeNull() { var input = new double?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4642,14 +4642,14 @@ public async Task Min_AsyncSelector_Double_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_4_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_4_SomeNull() { var input = new double?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4658,7 +4658,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_4_SomeNull() #endif [Fact] - public async Task Min_Double_8() + public async Task MinAsync_Double_8() { var input = new double[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -4673,7 +4673,7 @@ public async Task Min_Double_8() } [Fact] - public async Task Min_Selector_Double_8() + public async Task MinAsync_Selector_Double_8() { var input = new double[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -4688,14 +4688,14 @@ public async Task Min_Selector_Double_8() } [Fact] - public async Task Min_AsyncSelector_Double_8() + public async Task MinAwaitAsync_Selector_Double_8() { var input = new double[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4704,14 +4704,14 @@ public async Task Min_AsyncSelector_Double_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_8() + public async Task MinAwaitWithCancellationAsync_Selector_Double_8() { var input = new double[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4720,7 +4720,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_8() #endif [Fact] - public async Task Min_Double_Nullable_8_NoNull() + public async Task MinAsync_Double_Nullable_8_NoNull() { var input = new double?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -4735,7 +4735,7 @@ public async Task Min_Double_Nullable_8_NoNull() } [Fact] - public async Task Min_Selector_Double_Nullable_8_NoNull() + public async Task MinAsync_Selector_Double_Nullable_8_NoNull() { var input = new double?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -4750,14 +4750,14 @@ public async Task Min_Selector_Double_Nullable_8_NoNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_8_NoNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_8_NoNull() { var input = new double?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4766,14 +4766,14 @@ public async Task Min_AsyncSelector_Double_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_8_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_8_NoNull() { var input = new double?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4782,7 +4782,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_8_NoNull() #endif [Fact] - public async Task Min_Double_Nullable_8_AllNull() + public async Task MinAsync_Double_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); @@ -4792,7 +4792,7 @@ public async Task Min_Double_Nullable_8_AllNull() } [Fact] - public async Task Min_Selector_Double_Nullable_8_AllNull() + public async Task MinAsync_Selector_Double_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); @@ -4802,29 +4802,29 @@ public async Task Min_Selector_Double_Nullable_8_AllNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_8_AllNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_8_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_Nullable_8_SomeNull() + public async Task MinAsync_Double_Nullable_8_SomeNull() { var input = new double?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -4839,7 +4839,7 @@ public async Task Min_Double_Nullable_8_SomeNull() } [Fact] - public async Task Min_Selector_Double_Nullable_8_SomeNull() + public async Task MinAsync_Selector_Double_Nullable_8_SomeNull() { var input = new double?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -4854,14 +4854,14 @@ public async Task Min_Selector_Double_Nullable_8_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_8_SomeNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_8_SomeNull() { var input = new double?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4870,14 +4870,14 @@ public async Task Min_AsyncSelector_Double_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_8_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_8_SomeNull() { var input = new double?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4886,7 +4886,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_8_SomeNull() #endif [Fact] - public async Task Min_Double_16() + public async Task MinAsync_Double_16() { var input = new double[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -4901,7 +4901,7 @@ public async Task Min_Double_16() } [Fact] - public async Task Min_Selector_Double_16() + public async Task MinAsync_Selector_Double_16() { var input = new double[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -4916,14 +4916,14 @@ public async Task Min_Selector_Double_16() } [Fact] - public async Task Min_AsyncSelector_Double_16() + public async Task MinAwaitAsync_Selector_Double_16() { var input = new double[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4932,14 +4932,14 @@ public async Task Min_AsyncSelector_Double_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_16() + public async Task MinAwaitWithCancellationAsync_Selector_Double_16() { var input = new double[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4948,7 +4948,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_16() #endif [Fact] - public async Task Min_Double_Nullable_16_NoNull() + public async Task MinAsync_Double_Nullable_16_NoNull() { var input = new double?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -4963,7 +4963,7 @@ public async Task Min_Double_Nullable_16_NoNull() } [Fact] - public async Task Min_Selector_Double_Nullable_16_NoNull() + public async Task MinAsync_Selector_Double_Nullable_16_NoNull() { var input = new double?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -4978,14 +4978,14 @@ public async Task Min_Selector_Double_Nullable_16_NoNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_16_NoNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_16_NoNull() { var input = new double?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -4994,14 +4994,14 @@ public async Task Min_AsyncSelector_Double_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_16_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_16_NoNull() { var input = new double?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5010,7 +5010,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_16_NoNull() #endif [Fact] - public async Task Min_Double_Nullable_16_AllNull() + public async Task MinAsync_Double_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); @@ -5020,7 +5020,7 @@ public async Task Min_Double_Nullable_16_AllNull() } [Fact] - public async Task Min_Selector_Double_Nullable_16_AllNull() + public async Task MinAsync_Selector_Double_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); @@ -5030,29 +5030,29 @@ public async Task Min_Selector_Double_Nullable_16_AllNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_16_AllNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_16_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_Nullable_16_SomeNull() + public async Task MinAsync_Double_Nullable_16_SomeNull() { var input = new double?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -5067,7 +5067,7 @@ public async Task Min_Double_Nullable_16_SomeNull() } [Fact] - public async Task Min_Selector_Double_Nullable_16_SomeNull() + public async Task MinAsync_Selector_Double_Nullable_16_SomeNull() { var input = new double?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -5082,14 +5082,14 @@ public async Task Min_Selector_Double_Nullable_16_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Double_Nullable_16_SomeNull() + public async Task MinAwaitAsync_Selector_Double_Nullable_16_SomeNull() { var input = new double?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5098,14 +5098,14 @@ public async Task Min_AsyncSelector_Double_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_16_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_Nullable_16_SomeNull() { var input = new double?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5114,7 +5114,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_Nullable_16_SomeNull( #endif [Fact] - public async Task Min_Double_WithNaN_1() + public async Task MinAsync_Double_WithNaN_1() { var input = new double[] { double.NaN }.AsEnumerable(); @@ -5129,7 +5129,7 @@ public async Task Min_Double_WithNaN_1() } [Fact] - public async Task Min_Selector_Double_WithNaN_1() + public async Task MinAsync_Selector_Double_WithNaN_1() { var input = new double[] { double.NaN }.AsEnumerable(); @@ -5144,14 +5144,14 @@ public async Task Min_Selector_Double_WithNaN_1() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_1() + public async Task MinAwaitAsync_Selector_Double_WithNaN_1() { var input = new double[] { double.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5160,14 +5160,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_1() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_1() { var input = new double[] { double.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5176,7 +5176,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_1() #endif [Fact] - public async Task Min_Double_WithNaN_1_AllNaN() + public async Task MinAsync_Double_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); @@ -5186,7 +5186,7 @@ public async Task Min_Double_WithNaN_1_AllNaN() } [Fact] - public async Task Min_Selector_Double_WithNaN_1_AllNaN() + public async Task MinAsync_Selector_Double_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); @@ -5196,29 +5196,29 @@ public async Task Min_Selector_Double_WithNaN_1_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_1_AllNaN() + public async Task MinAwaitAsync_Selector_Double_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_1_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_1_NoNull() + public async Task MinAsync_Double_WithNaN_Nullable_1_NoNull() { var input = new double?[] { double.NaN }.AsEnumerable(); @@ -5233,7 +5233,7 @@ public async Task Min_Double_WithNaN_Nullable_1_NoNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_1_NoNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_1_NoNull() { var input = new double?[] { double.NaN }.AsEnumerable(); @@ -5248,14 +5248,14 @@ public async Task Min_Selector_Double_WithNaN_Nullable_1_NoNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_1_NoNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_1_NoNull() { var input = new double?[] { double.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5264,14 +5264,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_1_NoNull() { var input = new double?[] { double.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5280,7 +5280,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_No #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_1_AllNull() + public async Task MinAsync_Double_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); @@ -5290,7 +5290,7 @@ public async Task Min_Double_WithNaN_Nullable_1_AllNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_1_AllNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); @@ -5300,29 +5300,29 @@ public async Task Min_Selector_Double_WithNaN_Nullable_1_AllNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_1_AllNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_1_AllNaN() + public async Task MinAsync_Double_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); @@ -5332,7 +5332,7 @@ public async Task Min_Double_WithNaN_Nullable_1_AllNaN() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_1_AllNaN() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); @@ -5342,29 +5342,29 @@ public async Task Min_Selector_Double_WithNaN_Nullable_1_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_1_AllNaN() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_1_SomeNull() + public async Task MinAsync_Double_WithNaN_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -5379,7 +5379,7 @@ public async Task Min_Double_WithNaN_Nullable_1_SomeNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_1_SomeNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -5394,14 +5394,14 @@ public async Task Min_Selector_Double_WithNaN_Nullable_1_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_1_SomeNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5410,14 +5410,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5425,7 +5425,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_So } #endif [Fact] - public async Task Min_Double_WithNaN_4() + public async Task MinAsync_Double_WithNaN_4() { var input = new double[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); @@ -5440,7 +5440,7 @@ public async Task Min_Double_WithNaN_4() } [Fact] - public async Task Min_Selector_Double_WithNaN_4() + public async Task MinAsync_Selector_Double_WithNaN_4() { var input = new double[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); @@ -5455,14 +5455,14 @@ public async Task Min_Selector_Double_WithNaN_4() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_4() + public async Task MinAwaitAsync_Selector_Double_WithNaN_4() { var input = new double[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5471,14 +5471,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_4() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_4() { var input = new double[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5487,7 +5487,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_4() #endif [Fact] - public async Task Min_Double_WithNaN_4_AllNaN() + public async Task MinAsync_Double_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); @@ -5497,7 +5497,7 @@ public async Task Min_Double_WithNaN_4_AllNaN() } [Fact] - public async Task Min_Selector_Double_WithNaN_4_AllNaN() + public async Task MinAsync_Selector_Double_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); @@ -5507,29 +5507,29 @@ public async Task Min_Selector_Double_WithNaN_4_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_4_AllNaN() + public async Task MinAwaitAsync_Selector_Double_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_4_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_4_NoNull() + public async Task MinAsync_Double_WithNaN_Nullable_4_NoNull() { var input = new double?[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); @@ -5544,7 +5544,7 @@ public async Task Min_Double_WithNaN_Nullable_4_NoNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_4_NoNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_4_NoNull() { var input = new double?[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); @@ -5559,14 +5559,14 @@ public async Task Min_Selector_Double_WithNaN_Nullable_4_NoNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_4_NoNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_4_NoNull() { var input = new double?[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5575,14 +5575,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_4_NoNull() { var input = new double?[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5591,7 +5591,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_No #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_4_AllNull() + public async Task MinAsync_Double_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); @@ -5601,7 +5601,7 @@ public async Task Min_Double_WithNaN_Nullable_4_AllNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_4_AllNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); @@ -5611,29 +5611,29 @@ public async Task Min_Selector_Double_WithNaN_Nullable_4_AllNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_4_AllNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_4_AllNaN() + public async Task MinAsync_Double_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); @@ -5643,7 +5643,7 @@ public async Task Min_Double_WithNaN_Nullable_4_AllNaN() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_4_AllNaN() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); @@ -5653,29 +5653,29 @@ public async Task Min_Selector_Double_WithNaN_Nullable_4_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_4_AllNaN() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_4_SomeNull() + public async Task MinAsync_Double_WithNaN_Nullable_4_SomeNull() { var input = new double?[] { -2, null, double.NaN, -17 }.AsEnumerable(); @@ -5690,7 +5690,7 @@ public async Task Min_Double_WithNaN_Nullable_4_SomeNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_4_SomeNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_4_SomeNull() { var input = new double?[] { -2, null, double.NaN, -17 }.AsEnumerable(); @@ -5705,14 +5705,14 @@ public async Task Min_Selector_Double_WithNaN_Nullable_4_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_4_SomeNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_4_SomeNull() { var input = new double?[] { -2, null, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5721,14 +5721,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_4_SomeNull() { var input = new double?[] { -2, null, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5736,7 +5736,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_So } #endif [Fact] - public async Task Min_Double_WithNaN_8() + public async Task MinAsync_Double_WithNaN_8() { var input = new double[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); @@ -5751,7 +5751,7 @@ public async Task Min_Double_WithNaN_8() } [Fact] - public async Task Min_Selector_Double_WithNaN_8() + public async Task MinAsync_Selector_Double_WithNaN_8() { var input = new double[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); @@ -5766,14 +5766,14 @@ public async Task Min_Selector_Double_WithNaN_8() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_8() + public async Task MinAwaitAsync_Selector_Double_WithNaN_8() { var input = new double[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5782,14 +5782,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_8() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_8() { var input = new double[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5798,7 +5798,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_8() #endif [Fact] - public async Task Min_Double_WithNaN_8_AllNaN() + public async Task MinAsync_Double_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); @@ -5808,7 +5808,7 @@ public async Task Min_Double_WithNaN_8_AllNaN() } [Fact] - public async Task Min_Selector_Double_WithNaN_8_AllNaN() + public async Task MinAsync_Selector_Double_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); @@ -5818,29 +5818,29 @@ public async Task Min_Selector_Double_WithNaN_8_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_8_AllNaN() + public async Task MinAwaitAsync_Selector_Double_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_8_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_8_NoNull() + public async Task MinAsync_Double_WithNaN_Nullable_8_NoNull() { var input = new double?[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); @@ -5855,7 +5855,7 @@ public async Task Min_Double_WithNaN_Nullable_8_NoNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_8_NoNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_8_NoNull() { var input = new double?[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); @@ -5870,14 +5870,14 @@ public async Task Min_Selector_Double_WithNaN_Nullable_8_NoNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_8_NoNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_8_NoNull() { var input = new double?[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5886,14 +5886,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_8_NoNull() { var input = new double?[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -5902,7 +5902,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_No #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_8_AllNull() + public async Task MinAsync_Double_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); @@ -5912,7 +5912,7 @@ public async Task Min_Double_WithNaN_Nullable_8_AllNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_8_AllNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); @@ -5922,29 +5922,29 @@ public async Task Min_Selector_Double_WithNaN_Nullable_8_AllNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_8_AllNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_8_AllNaN() + public async Task MinAsync_Double_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); @@ -5954,7 +5954,7 @@ public async Task Min_Double_WithNaN_Nullable_8_AllNaN() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_8_AllNaN() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); @@ -5964,29 +5964,29 @@ public async Task Min_Selector_Double_WithNaN_Nullable_8_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_8_AllNaN() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_8_SomeNull() + public async Task MinAsync_Double_WithNaN_Nullable_8_SomeNull() { var input = new double?[] { -48, null, double.NaN, -46, null, double.NaN, -10, null }.AsEnumerable(); @@ -6001,7 +6001,7 @@ public async Task Min_Double_WithNaN_Nullable_8_SomeNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_8_SomeNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_8_SomeNull() { var input = new double?[] { -48, null, double.NaN, -46, null, double.NaN, -10, null }.AsEnumerable(); @@ -6016,14 +6016,14 @@ public async Task Min_Selector_Double_WithNaN_Nullable_8_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_8_SomeNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_8_SomeNull() { var input = new double?[] { -48, null, double.NaN, -46, null, double.NaN, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6032,14 +6032,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_8_SomeNull() { var input = new double?[] { -48, null, double.NaN, -46, null, double.NaN, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6047,7 +6047,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_So } #endif [Fact] - public async Task Min_Double_WithNaN_16() + public async Task MinAsync_Double_WithNaN_16() { var input = new double[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); @@ -6062,7 +6062,7 @@ public async Task Min_Double_WithNaN_16() } [Fact] - public async Task Min_Selector_Double_WithNaN_16() + public async Task MinAsync_Selector_Double_WithNaN_16() { var input = new double[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); @@ -6077,14 +6077,14 @@ public async Task Min_Selector_Double_WithNaN_16() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_16() + public async Task MinAwaitAsync_Selector_Double_WithNaN_16() { var input = new double[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6093,14 +6093,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_16() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_16() { var input = new double[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6109,7 +6109,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_16() #endif [Fact] - public async Task Min_Double_WithNaN_16_AllNaN() + public async Task MinAsync_Double_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); @@ -6119,7 +6119,7 @@ public async Task Min_Double_WithNaN_16_AllNaN() } [Fact] - public async Task Min_Selector_Double_WithNaN_16_AllNaN() + public async Task MinAsync_Selector_Double_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); @@ -6129,29 +6129,29 @@ public async Task Min_Selector_Double_WithNaN_16_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_16_AllNaN() + public async Task MinAwaitAsync_Selector_Double_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_16_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_16_NoNull() + public async Task MinAsync_Double_WithNaN_Nullable_16_NoNull() { var input = new double?[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); @@ -6166,7 +6166,7 @@ public async Task Min_Double_WithNaN_Nullable_16_NoNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_16_NoNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_16_NoNull() { var input = new double?[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); @@ -6181,14 +6181,14 @@ public async Task Min_Selector_Double_WithNaN_Nullable_16_NoNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_16_NoNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_16_NoNull() { var input = new double?[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6197,14 +6197,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_16_NoNull() { var input = new double?[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6213,7 +6213,7 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_N #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_16_AllNull() + public async Task MinAsync_Double_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); @@ -6223,7 +6223,7 @@ public async Task Min_Double_WithNaN_Nullable_16_AllNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_16_AllNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); @@ -6233,29 +6233,29 @@ public async Task Min_Selector_Double_WithNaN_Nullable_16_AllNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_16_AllNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_16_AllNaN() + public async Task MinAsync_Double_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); @@ -6265,7 +6265,7 @@ public async Task Min_Double_WithNaN_Nullable_16_AllNaN() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_16_AllNaN() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); @@ -6275,29 +6275,29 @@ public async Task Min_Selector_Double_WithNaN_Nullable_16_AllNaN() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_16_AllNaN() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_AllNaN() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Double_WithNaN_Nullable_16_SomeNull() + public async Task MinAsync_Double_WithNaN_Nullable_16_SomeNull() { var input = new double?[] { 59, null, double.NaN, 98, null, double.NaN, -100, null, double.NaN, -86, null, double.NaN, 19, null, double.NaN, 41 }.AsEnumerable(); @@ -6312,7 +6312,7 @@ public async Task Min_Double_WithNaN_Nullable_16_SomeNull() } [Fact] - public async Task Min_Selector_Double_WithNaN_Nullable_16_SomeNull() + public async Task MinAsync_Selector_Double_WithNaN_Nullable_16_SomeNull() { var input = new double?[] { 59, null, double.NaN, 98, null, double.NaN, -100, null, double.NaN, -86, null, double.NaN, 19, null, double.NaN, 41 }.AsEnumerable(); @@ -6327,14 +6327,14 @@ public async Task Min_Selector_Double_WithNaN_Nullable_16_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Double_WithNaN_Nullable_16_SomeNull() + public async Task MinAwaitAsync_Selector_Double_WithNaN_Nullable_16_SomeNull() { var input = new double?[] { 59, null, double.NaN, 98, null, double.NaN, -100, null, double.NaN, -86, null, double.NaN, 19, null, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6343,14 +6343,14 @@ public async Task Min_AsyncSelector_Double_WithNaN_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_16_SomeNull() { var input = new double?[] { 59, null, double.NaN, 98, null, double.NaN, -100, null, double.NaN, -86, null, double.NaN, 19, null, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6358,59 +6358,59 @@ public async Task Min_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_S } #endif [Fact] - public async Task Min_Empty_Decimal() + public async Task MinAsync_Empty_Decimal() { await AssertThrowsAsync(new decimal[0].ToAsyncEnumerable().MinAsync(CancellationToken.None).AsTask()); } [Fact] - public async Task Min_Selector_Empty_Decimal() + public async Task MinAsync_Selector_Empty_Decimal() { await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync(_ => default(decimal), CancellationToken.None).AsTask()); } [Fact] - public async Task Min_AsyncSelector_Empty_Decimal() + public async Task MinAwaitAsync_Selector_Empty_Decimal() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAwaitAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Empty_Decimal() + public async Task MinAwaitWithCancellationAsync_Selector_Empty_Decimal() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); } #endif [Fact] - public async Task Min_Empty_Nullable_Decimal() + public async Task MinAsync_Empty_Nullable_Decimal() { Assert.Null(await new decimal?[0].ToAsyncEnumerable().MinAsync(CancellationToken.None)); } [Fact] - public async Task Min_Selector_Empty_Nullable_Decimal() + public async Task MinAsync_Selector_Empty_Nullable_Decimal() { Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync(_ => default(decimal?), CancellationToken.None)); } [Fact] - public async Task Min_AsyncSelector_Empty_Nullable_Decimal() + public async Task MinAwaitAsync_Selector_Empty_Nullable_Decimal() { - Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync(_ => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MinAwaitAsync(_ => default(ValueTask), CancellationToken.None)); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Empty_Nullable_Decimal() + public async Task MinAwaitWithCancellationAsync_Selector_Empty_Nullable_Decimal() { - Assert.Null(await new object[0].ToAsyncEnumerable().MinAsync((x, ct) => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None)); } #endif [Fact] - public async Task Min_Decimal_1() + public async Task MinAsync_Decimal_1() { var input = new decimal[] { 33 }.AsEnumerable(); @@ -6425,7 +6425,7 @@ public async Task Min_Decimal_1() } [Fact] - public async Task Min_Selector_Decimal_1() + public async Task MinAsync_Selector_Decimal_1() { var input = new decimal[] { 33 }.AsEnumerable(); @@ -6440,14 +6440,14 @@ public async Task Min_Selector_Decimal_1() } [Fact] - public async Task Min_AsyncSelector_Decimal_1() + public async Task MinAwaitAsync_Selector_Decimal_1() { var input = new decimal[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6456,14 +6456,14 @@ public async Task Min_AsyncSelector_Decimal_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_1() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_1() { var input = new decimal[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6472,7 +6472,7 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_1() #endif [Fact] - public async Task Min_Decimal_Nullable_1_NoNull() + public async Task MinAsync_Decimal_Nullable_1_NoNull() { var input = new decimal?[] { 33 }.AsEnumerable(); @@ -6487,7 +6487,7 @@ public async Task Min_Decimal_Nullable_1_NoNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_1_NoNull() + public async Task MinAsync_Selector_Decimal_Nullable_1_NoNull() { var input = new decimal?[] { 33 }.AsEnumerable(); @@ -6502,14 +6502,14 @@ public async Task Min_Selector_Decimal_Nullable_1_NoNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_1_NoNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_1_NoNull() { var input = new decimal?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6518,14 +6518,14 @@ public async Task Min_AsyncSelector_Decimal_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_1_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_1_NoNull() { var input = new decimal?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6534,7 +6534,7 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_1_NoNull() #endif [Fact] - public async Task Min_Decimal_Nullable_1_AllNull() + public async Task MinAsync_Decimal_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(decimal?), 1); @@ -6544,7 +6544,7 @@ public async Task Min_Decimal_Nullable_1_AllNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_1_AllNull() + public async Task MinAsync_Selector_Decimal_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(decimal?), 1); @@ -6554,29 +6554,29 @@ public async Task Min_Selector_Decimal_Nullable_1_AllNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_1_AllNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(decimal?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_1_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(decimal?), 1); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Decimal_Nullable_1_SomeNull() + public async Task MinAsync_Decimal_Nullable_1_SomeNull() { var input = new decimal?[] { 33 }.AsEnumerable(); @@ -6591,7 +6591,7 @@ public async Task Min_Decimal_Nullable_1_SomeNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_1_SomeNull() + public async Task MinAsync_Selector_Decimal_Nullable_1_SomeNull() { var input = new decimal?[] { 33 }.AsEnumerable(); @@ -6606,14 +6606,14 @@ public async Task Min_Selector_Decimal_Nullable_1_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_1_SomeNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_1_SomeNull() { var input = new decimal?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6622,14 +6622,14 @@ public async Task Min_AsyncSelector_Decimal_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_1_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_1_SomeNull() { var input = new decimal?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6638,7 +6638,7 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_1_SomeNull( #endif [Fact] - public async Task Min_Decimal_4() + public async Task MinAsync_Decimal_4() { var input = new decimal[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -6653,7 +6653,7 @@ public async Task Min_Decimal_4() } [Fact] - public async Task Min_Selector_Decimal_4() + public async Task MinAsync_Selector_Decimal_4() { var input = new decimal[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -6668,14 +6668,14 @@ public async Task Min_Selector_Decimal_4() } [Fact] - public async Task Min_AsyncSelector_Decimal_4() + public async Task MinAwaitAsync_Selector_Decimal_4() { var input = new decimal[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6684,14 +6684,14 @@ public async Task Min_AsyncSelector_Decimal_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_4() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_4() { var input = new decimal[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6700,7 +6700,7 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_4() #endif [Fact] - public async Task Min_Decimal_Nullable_4_NoNull() + public async Task MinAsync_Decimal_Nullable_4_NoNull() { var input = new decimal?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -6715,7 +6715,7 @@ public async Task Min_Decimal_Nullable_4_NoNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_4_NoNull() + public async Task MinAsync_Selector_Decimal_Nullable_4_NoNull() { var input = new decimal?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -6730,14 +6730,14 @@ public async Task Min_Selector_Decimal_Nullable_4_NoNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_4_NoNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_4_NoNull() { var input = new decimal?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6746,14 +6746,14 @@ public async Task Min_AsyncSelector_Decimal_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_4_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_4_NoNull() { var input = new decimal?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6762,7 +6762,7 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_4_NoNull() #endif [Fact] - public async Task Min_Decimal_Nullable_4_AllNull() + public async Task MinAsync_Decimal_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(decimal?), 4); @@ -6772,7 +6772,7 @@ public async Task Min_Decimal_Nullable_4_AllNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_4_AllNull() + public async Task MinAsync_Selector_Decimal_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(decimal?), 4); @@ -6782,29 +6782,29 @@ public async Task Min_Selector_Decimal_Nullable_4_AllNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_4_AllNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(decimal?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_4_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(decimal?), 4); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Decimal_Nullable_4_SomeNull() + public async Task MinAsync_Decimal_Nullable_4_SomeNull() { var input = new decimal?[] { -2, null, -61, null }.AsEnumerable(); @@ -6819,7 +6819,7 @@ public async Task Min_Decimal_Nullable_4_SomeNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_4_SomeNull() + public async Task MinAsync_Selector_Decimal_Nullable_4_SomeNull() { var input = new decimal?[] { -2, null, -61, null }.AsEnumerable(); @@ -6834,14 +6834,14 @@ public async Task Min_Selector_Decimal_Nullable_4_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_4_SomeNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_4_SomeNull() { var input = new decimal?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6850,14 +6850,14 @@ public async Task Min_AsyncSelector_Decimal_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_4_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_4_SomeNull() { var input = new decimal?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6866,7 +6866,7 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_4_SomeNull( #endif [Fact] - public async Task Min_Decimal_8() + public async Task MinAsync_Decimal_8() { var input = new decimal[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -6881,7 +6881,7 @@ public async Task Min_Decimal_8() } [Fact] - public async Task Min_Selector_Decimal_8() + public async Task MinAsync_Selector_Decimal_8() { var input = new decimal[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -6896,14 +6896,14 @@ public async Task Min_Selector_Decimal_8() } [Fact] - public async Task Min_AsyncSelector_Decimal_8() + public async Task MinAwaitAsync_Selector_Decimal_8() { var input = new decimal[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6912,14 +6912,14 @@ public async Task Min_AsyncSelector_Decimal_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_8() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_8() { var input = new decimal[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6928,7 +6928,7 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_8() #endif [Fact] - public async Task Min_Decimal_Nullable_8_NoNull() + public async Task MinAsync_Decimal_Nullable_8_NoNull() { var input = new decimal?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -6943,7 +6943,7 @@ public async Task Min_Decimal_Nullable_8_NoNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_8_NoNull() + public async Task MinAsync_Selector_Decimal_Nullable_8_NoNull() { var input = new decimal?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -6958,14 +6958,14 @@ public async Task Min_Selector_Decimal_Nullable_8_NoNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_8_NoNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_8_NoNull() { var input = new decimal?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6974,14 +6974,14 @@ public async Task Min_AsyncSelector_Decimal_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_8_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_8_NoNull() { var input = new decimal?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -6990,7 +6990,7 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_8_NoNull() #endif [Fact] - public async Task Min_Decimal_Nullable_8_AllNull() + public async Task MinAsync_Decimal_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(decimal?), 8); @@ -7000,7 +7000,7 @@ public async Task Min_Decimal_Nullable_8_AllNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_8_AllNull() + public async Task MinAsync_Selector_Decimal_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(decimal?), 8); @@ -7010,29 +7010,29 @@ public async Task Min_Selector_Decimal_Nullable_8_AllNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_8_AllNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(decimal?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_8_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(decimal?), 8); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Decimal_Nullable_8_SomeNull() + public async Task MinAsync_Decimal_Nullable_8_SomeNull() { var input = new decimal?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -7047,7 +7047,7 @@ public async Task Min_Decimal_Nullable_8_SomeNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_8_SomeNull() + public async Task MinAsync_Selector_Decimal_Nullable_8_SomeNull() { var input = new decimal?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -7062,14 +7062,14 @@ public async Task Min_Selector_Decimal_Nullable_8_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_8_SomeNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_8_SomeNull() { var input = new decimal?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7078,14 +7078,14 @@ public async Task Min_AsyncSelector_Decimal_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_8_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_8_SomeNull() { var input = new decimal?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7094,7 +7094,7 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_8_SomeNull( #endif [Fact] - public async Task Min_Decimal_16() + public async Task MinAsync_Decimal_16() { var input = new decimal[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -7109,7 +7109,7 @@ public async Task Min_Decimal_16() } [Fact] - public async Task Min_Selector_Decimal_16() + public async Task MinAsync_Selector_Decimal_16() { var input = new decimal[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -7124,14 +7124,14 @@ public async Task Min_Selector_Decimal_16() } [Fact] - public async Task Min_AsyncSelector_Decimal_16() + public async Task MinAwaitAsync_Selector_Decimal_16() { var input = new decimal[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7140,14 +7140,14 @@ public async Task Min_AsyncSelector_Decimal_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_16() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_16() { var input = new decimal[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7156,7 +7156,7 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_16() #endif [Fact] - public async Task Min_Decimal_Nullable_16_NoNull() + public async Task MinAsync_Decimal_Nullable_16_NoNull() { var input = new decimal?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -7171,7 +7171,7 @@ public async Task Min_Decimal_Nullable_16_NoNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_16_NoNull() + public async Task MinAsync_Selector_Decimal_Nullable_16_NoNull() { var input = new decimal?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -7186,14 +7186,14 @@ public async Task Min_Selector_Decimal_Nullable_16_NoNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_16_NoNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_16_NoNull() { var input = new decimal?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7202,14 +7202,14 @@ public async Task Min_AsyncSelector_Decimal_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_16_NoNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_16_NoNull() { var input = new decimal?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7218,7 +7218,7 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_16_NoNull() #endif [Fact] - public async Task Min_Decimal_Nullable_16_AllNull() + public async Task MinAsync_Decimal_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(decimal?), 16); @@ -7228,7 +7228,7 @@ public async Task Min_Decimal_Nullable_16_AllNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_16_AllNull() + public async Task MinAsync_Selector_Decimal_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(decimal?), 16); @@ -7238,29 +7238,29 @@ public async Task Min_Selector_Decimal_Nullable_16_AllNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_16_AllNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(decimal?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_16_AllNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(decimal?), 16); var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Min_Decimal_Nullable_16_SomeNull() + public async Task MinAsync_Decimal_Nullable_16_SomeNull() { var input = new decimal?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -7275,7 +7275,7 @@ public async Task Min_Decimal_Nullable_16_SomeNull() } [Fact] - public async Task Min_Selector_Decimal_Nullable_16_SomeNull() + public async Task MinAsync_Selector_Decimal_Nullable_16_SomeNull() { var input = new decimal?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -7290,14 +7290,14 @@ public async Task Min_Selector_Decimal_Nullable_16_SomeNull() } [Fact] - public async Task Min_AsyncSelector_Decimal_Nullable_16_SomeNull() + public async Task MinAwaitAsync_Selector_Decimal_Nullable_16_SomeNull() { var input = new decimal?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7306,14 +7306,14 @@ public async Task Min_AsyncSelector_Decimal_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_16_SomeNull() + public async Task MinAwaitWithCancellationAsync_Selector_Decimal_Nullable_16_SomeNull() { var input = new decimal?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Min(); - var actual = await input.ToAsyncEnumerable().MinAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MinAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7322,59 +7322,59 @@ public async Task Min_AsyncSelectorWithCancellation_Decimal_Nullable_16_SomeNull #endif [Fact] - public async Task Max_Empty_Int32() + public async Task MaxAsync_Empty_Int32() { await AssertThrowsAsync(new int[0].ToAsyncEnumerable().MaxAsync(CancellationToken.None).AsTask()); } [Fact] - public async Task Max_Selector_Empty_Int32() + public async Task MaxAsync_Selector_Empty_Int32() { await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync(_ => default(int), CancellationToken.None).AsTask()); } [Fact] - public async Task Max_AsyncSelector_Empty_Int32() + public async Task MaxAwaitAsync_Selector_Empty_Int32() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAwaitAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Empty_Int32() + public async Task MaxAwaitWithCancellationAsync_Selector_Empty_Int32() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); } #endif [Fact] - public async Task Max_Empty_Nullable_Int32() + public async Task MaxAsync_Empty_Nullable_Int32() { Assert.Null(await new int?[0].ToAsyncEnumerable().MaxAsync(CancellationToken.None)); } [Fact] - public async Task Max_Selector_Empty_Nullable_Int32() + public async Task MaxAsync_Selector_Empty_Nullable_Int32() { Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync(_ => default(int?), CancellationToken.None)); } [Fact] - public async Task Max_AsyncSelector_Empty_Nullable_Int32() + public async Task MaxAwaitAsync_Selector_Empty_Nullable_Int32() { - Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync(_ => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MaxAwaitAsync(_ => default(ValueTask), CancellationToken.None)); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Empty_Nullable_Int32() + public async Task MaxAwaitWithCancellationAsync_Selector_Empty_Nullable_Int32() { - Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync((x, ct) => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None)); } #endif [Fact] - public async Task Max_Int32_1() + public async Task MaxAsync_Int32_1() { var input = new int[] { 33 }.AsEnumerable(); @@ -7389,7 +7389,7 @@ public async Task Max_Int32_1() } [Fact] - public async Task Max_Selector_Int32_1() + public async Task MaxAsync_Selector_Int32_1() { var input = new int[] { 33 }.AsEnumerable(); @@ -7404,14 +7404,14 @@ public async Task Max_Selector_Int32_1() } [Fact] - public async Task Max_AsyncSelector_Int32_1() + public async Task MaxAwaitAsync_Selector_Int32_1() { var input = new int[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7420,14 +7420,14 @@ public async Task Max_AsyncSelector_Int32_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_1() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_1() { var input = new int[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7436,7 +7436,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_1() #endif [Fact] - public async Task Max_Int32_Nullable_1_NoNull() + public async Task MaxAsync_Int32_Nullable_1_NoNull() { var input = new int?[] { 33 }.AsEnumerable(); @@ -7451,7 +7451,7 @@ public async Task Max_Int32_Nullable_1_NoNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_1_NoNull() + public async Task MaxAsync_Selector_Int32_Nullable_1_NoNull() { var input = new int?[] { 33 }.AsEnumerable(); @@ -7466,14 +7466,14 @@ public async Task Max_Selector_Int32_Nullable_1_NoNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_1_NoNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_1_NoNull() { var input = new int?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7482,14 +7482,14 @@ public async Task Max_AsyncSelector_Int32_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_1_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_1_NoNull() { var input = new int?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7498,7 +7498,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_1_NoNull() #endif [Fact] - public async Task Max_Int32_Nullable_1_AllNull() + public async Task MaxAsync_Int32_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(int?), 1); @@ -7508,7 +7508,7 @@ public async Task Max_Int32_Nullable_1_AllNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_1_AllNull() + public async Task MaxAsync_Selector_Int32_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(int?), 1); @@ -7518,29 +7518,29 @@ public async Task Max_Selector_Int32_Nullable_1_AllNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_1_AllNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(int?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_1_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(int?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Int32_Nullable_1_SomeNull() + public async Task MaxAsync_Int32_Nullable_1_SomeNull() { var input = new int?[] { 33 }.AsEnumerable(); @@ -7555,7 +7555,7 @@ public async Task Max_Int32_Nullable_1_SomeNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_1_SomeNull() + public async Task MaxAsync_Selector_Int32_Nullable_1_SomeNull() { var input = new int?[] { 33 }.AsEnumerable(); @@ -7570,14 +7570,14 @@ public async Task Max_Selector_Int32_Nullable_1_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_1_SomeNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_1_SomeNull() { var input = new int?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7586,14 +7586,14 @@ public async Task Max_AsyncSelector_Int32_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_1_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_1_SomeNull() { var input = new int?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7602,7 +7602,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_1_SomeNull() #endif [Fact] - public async Task Max_Int32_4() + public async Task MaxAsync_Int32_4() { var input = new int[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -7617,7 +7617,7 @@ public async Task Max_Int32_4() } [Fact] - public async Task Max_Selector_Int32_4() + public async Task MaxAsync_Selector_Int32_4() { var input = new int[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -7632,14 +7632,14 @@ public async Task Max_Selector_Int32_4() } [Fact] - public async Task Max_AsyncSelector_Int32_4() + public async Task MaxAwaitAsync_Selector_Int32_4() { var input = new int[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7648,14 +7648,14 @@ public async Task Max_AsyncSelector_Int32_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_4() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_4() { var input = new int[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7664,7 +7664,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_4() #endif [Fact] - public async Task Max_Int32_Nullable_4_NoNull() + public async Task MaxAsync_Int32_Nullable_4_NoNull() { var input = new int?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -7679,7 +7679,7 @@ public async Task Max_Int32_Nullable_4_NoNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_4_NoNull() + public async Task MaxAsync_Selector_Int32_Nullable_4_NoNull() { var input = new int?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -7694,14 +7694,14 @@ public async Task Max_Selector_Int32_Nullable_4_NoNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_4_NoNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_4_NoNull() { var input = new int?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7710,14 +7710,14 @@ public async Task Max_AsyncSelector_Int32_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_4_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_4_NoNull() { var input = new int?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7726,7 +7726,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_4_NoNull() #endif [Fact] - public async Task Max_Int32_Nullable_4_AllNull() + public async Task MaxAsync_Int32_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(int?), 4); @@ -7736,7 +7736,7 @@ public async Task Max_Int32_Nullable_4_AllNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_4_AllNull() + public async Task MaxAsync_Selector_Int32_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(int?), 4); @@ -7746,29 +7746,29 @@ public async Task Max_Selector_Int32_Nullable_4_AllNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_4_AllNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(int?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_4_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(int?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Int32_Nullable_4_SomeNull() + public async Task MaxAsync_Int32_Nullable_4_SomeNull() { var input = new int?[] { -2, null, -61, null }.AsEnumerable(); @@ -7783,7 +7783,7 @@ public async Task Max_Int32_Nullable_4_SomeNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_4_SomeNull() + public async Task MaxAsync_Selector_Int32_Nullable_4_SomeNull() { var input = new int?[] { -2, null, -61, null }.AsEnumerable(); @@ -7798,14 +7798,14 @@ public async Task Max_Selector_Int32_Nullable_4_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_4_SomeNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_4_SomeNull() { var input = new int?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7814,14 +7814,14 @@ public async Task Max_AsyncSelector_Int32_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_4_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_4_SomeNull() { var input = new int?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7830,7 +7830,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_4_SomeNull() #endif [Fact] - public async Task Max_Int32_8() + public async Task MaxAsync_Int32_8() { var input = new int[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -7845,7 +7845,7 @@ public async Task Max_Int32_8() } [Fact] - public async Task Max_Selector_Int32_8() + public async Task MaxAsync_Selector_Int32_8() { var input = new int[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -7860,14 +7860,14 @@ public async Task Max_Selector_Int32_8() } [Fact] - public async Task Max_AsyncSelector_Int32_8() + public async Task MaxAwaitAsync_Selector_Int32_8() { var input = new int[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7876,14 +7876,14 @@ public async Task Max_AsyncSelector_Int32_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_8() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_8() { var input = new int[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7892,7 +7892,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_8() #endif [Fact] - public async Task Max_Int32_Nullable_8_NoNull() + public async Task MaxAsync_Int32_Nullable_8_NoNull() { var input = new int?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -7907,7 +7907,7 @@ public async Task Max_Int32_Nullable_8_NoNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_8_NoNull() + public async Task MaxAsync_Selector_Int32_Nullable_8_NoNull() { var input = new int?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -7922,14 +7922,14 @@ public async Task Max_Selector_Int32_Nullable_8_NoNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_8_NoNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_8_NoNull() { var input = new int?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7938,14 +7938,14 @@ public async Task Max_AsyncSelector_Int32_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_8_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_8_NoNull() { var input = new int?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -7954,7 +7954,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_8_NoNull() #endif [Fact] - public async Task Max_Int32_Nullable_8_AllNull() + public async Task MaxAsync_Int32_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(int?), 8); @@ -7964,7 +7964,7 @@ public async Task Max_Int32_Nullable_8_AllNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_8_AllNull() + public async Task MaxAsync_Selector_Int32_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(int?), 8); @@ -7974,29 +7974,29 @@ public async Task Max_Selector_Int32_Nullable_8_AllNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_8_AllNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(int?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_8_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(int?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Int32_Nullable_8_SomeNull() + public async Task MaxAsync_Int32_Nullable_8_SomeNull() { var input = new int?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -8011,7 +8011,7 @@ public async Task Max_Int32_Nullable_8_SomeNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_8_SomeNull() + public async Task MaxAsync_Selector_Int32_Nullable_8_SomeNull() { var input = new int?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -8026,14 +8026,14 @@ public async Task Max_Selector_Int32_Nullable_8_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_8_SomeNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_8_SomeNull() { var input = new int?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8042,14 +8042,14 @@ public async Task Max_AsyncSelector_Int32_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_8_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_8_SomeNull() { var input = new int?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8058,7 +8058,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_8_SomeNull() #endif [Fact] - public async Task Max_Int32_16() + public async Task MaxAsync_Int32_16() { var input = new int[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -8073,7 +8073,7 @@ public async Task Max_Int32_16() } [Fact] - public async Task Max_Selector_Int32_16() + public async Task MaxAsync_Selector_Int32_16() { var input = new int[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -8088,14 +8088,14 @@ public async Task Max_Selector_Int32_16() } [Fact] - public async Task Max_AsyncSelector_Int32_16() + public async Task MaxAwaitAsync_Selector_Int32_16() { var input = new int[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8104,14 +8104,14 @@ public async Task Max_AsyncSelector_Int32_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_16() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_16() { var input = new int[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8120,7 +8120,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_16() #endif [Fact] - public async Task Max_Int32_Nullable_16_NoNull() + public async Task MaxAsync_Int32_Nullable_16_NoNull() { var input = new int?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -8135,7 +8135,7 @@ public async Task Max_Int32_Nullable_16_NoNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_16_NoNull() + public async Task MaxAsync_Selector_Int32_Nullable_16_NoNull() { var input = new int?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -8150,14 +8150,14 @@ public async Task Max_Selector_Int32_Nullable_16_NoNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_16_NoNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_16_NoNull() { var input = new int?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8166,14 +8166,14 @@ public async Task Max_AsyncSelector_Int32_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_16_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_16_NoNull() { var input = new int?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8182,7 +8182,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_16_NoNull() #endif [Fact] - public async Task Max_Int32_Nullable_16_AllNull() + public async Task MaxAsync_Int32_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(int?), 16); @@ -8192,7 +8192,7 @@ public async Task Max_Int32_Nullable_16_AllNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_16_AllNull() + public async Task MaxAsync_Selector_Int32_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(int?), 16); @@ -8202,29 +8202,29 @@ public async Task Max_Selector_Int32_Nullable_16_AllNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_16_AllNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(int?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_16_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(int?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Int32_Nullable_16_SomeNull() + public async Task MaxAsync_Int32_Nullable_16_SomeNull() { var input = new int?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -8239,7 +8239,7 @@ public async Task Max_Int32_Nullable_16_SomeNull() } [Fact] - public async Task Max_Selector_Int32_Nullable_16_SomeNull() + public async Task MaxAsync_Selector_Int32_Nullable_16_SomeNull() { var input = new int?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -8254,14 +8254,14 @@ public async Task Max_Selector_Int32_Nullable_16_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Int32_Nullable_16_SomeNull() + public async Task MaxAwaitAsync_Selector_Int32_Nullable_16_SomeNull() { var input = new int?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8270,14 +8270,14 @@ public async Task Max_AsyncSelector_Int32_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_16_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int32_Nullable_16_SomeNull() { var input = new int?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8286,59 +8286,59 @@ public async Task Max_AsyncSelectorWithCancellation_Int32_Nullable_16_SomeNull() #endif [Fact] - public async Task Max_Empty_Int64() + public async Task MaxAsync_Empty_Int64() { await AssertThrowsAsync(new long[0].ToAsyncEnumerable().MaxAsync(CancellationToken.None).AsTask()); } [Fact] - public async Task Max_Selector_Empty_Int64() + public async Task MaxAsync_Selector_Empty_Int64() { await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync(_ => default(long), CancellationToken.None).AsTask()); } [Fact] - public async Task Max_AsyncSelector_Empty_Int64() + public async Task MaxAwaitAsync_Selector_Empty_Int64() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAwaitAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Empty_Int64() + public async Task MaxAwaitWithCancellationAsync_Selector_Empty_Int64() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); } #endif [Fact] - public async Task Max_Empty_Nullable_Int64() + public async Task MaxAsync_Empty_Nullable_Int64() { Assert.Null(await new long?[0].ToAsyncEnumerable().MaxAsync(CancellationToken.None)); } [Fact] - public async Task Max_Selector_Empty_Nullable_Int64() + public async Task MaxAsync_Selector_Empty_Nullable_Int64() { Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync(_ => default(long?), CancellationToken.None)); } [Fact] - public async Task Max_AsyncSelector_Empty_Nullable_Int64() + public async Task MaxAwaitAsync_Selector_Empty_Nullable_Int64() { - Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync(_ => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MaxAwaitAsync(_ => default(ValueTask), CancellationToken.None)); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Empty_Nullable_Int64() + public async Task MaxAwaitWithCancellationAsync_Selector_Empty_Nullable_Int64() { - Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync((x, ct) => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None)); } #endif [Fact] - public async Task Max_Int64_1() + public async Task MaxAsync_Int64_1() { var input = new long[] { 33 }.AsEnumerable(); @@ -8353,7 +8353,7 @@ public async Task Max_Int64_1() } [Fact] - public async Task Max_Selector_Int64_1() + public async Task MaxAsync_Selector_Int64_1() { var input = new long[] { 33 }.AsEnumerable(); @@ -8368,14 +8368,14 @@ public async Task Max_Selector_Int64_1() } [Fact] - public async Task Max_AsyncSelector_Int64_1() + public async Task MaxAwaitAsync_Selector_Int64_1() { var input = new long[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8384,14 +8384,14 @@ public async Task Max_AsyncSelector_Int64_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_1() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_1() { var input = new long[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8400,7 +8400,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_1() #endif [Fact] - public async Task Max_Int64_Nullable_1_NoNull() + public async Task MaxAsync_Int64_Nullable_1_NoNull() { var input = new long?[] { 33 }.AsEnumerable(); @@ -8415,7 +8415,7 @@ public async Task Max_Int64_Nullable_1_NoNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_1_NoNull() + public async Task MaxAsync_Selector_Int64_Nullable_1_NoNull() { var input = new long?[] { 33 }.AsEnumerable(); @@ -8430,14 +8430,14 @@ public async Task Max_Selector_Int64_Nullable_1_NoNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_1_NoNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_1_NoNull() { var input = new long?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8446,14 +8446,14 @@ public async Task Max_AsyncSelector_Int64_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_1_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_1_NoNull() { var input = new long?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8462,7 +8462,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_1_NoNull() #endif [Fact] - public async Task Max_Int64_Nullable_1_AllNull() + public async Task MaxAsync_Int64_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(long?), 1); @@ -8472,7 +8472,7 @@ public async Task Max_Int64_Nullable_1_AllNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_1_AllNull() + public async Task MaxAsync_Selector_Int64_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(long?), 1); @@ -8482,29 +8482,29 @@ public async Task Max_Selector_Int64_Nullable_1_AllNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_1_AllNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(long?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_1_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(long?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Int64_Nullable_1_SomeNull() + public async Task MaxAsync_Int64_Nullable_1_SomeNull() { var input = new long?[] { 33 }.AsEnumerable(); @@ -8519,7 +8519,7 @@ public async Task Max_Int64_Nullable_1_SomeNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_1_SomeNull() + public async Task MaxAsync_Selector_Int64_Nullable_1_SomeNull() { var input = new long?[] { 33 }.AsEnumerable(); @@ -8534,14 +8534,14 @@ public async Task Max_Selector_Int64_Nullable_1_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_1_SomeNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_1_SomeNull() { var input = new long?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8550,14 +8550,14 @@ public async Task Max_AsyncSelector_Int64_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_1_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_1_SomeNull() { var input = new long?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8566,7 +8566,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_1_SomeNull() #endif [Fact] - public async Task Max_Int64_4() + public async Task MaxAsync_Int64_4() { var input = new long[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -8581,7 +8581,7 @@ public async Task Max_Int64_4() } [Fact] - public async Task Max_Selector_Int64_4() + public async Task MaxAsync_Selector_Int64_4() { var input = new long[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -8596,14 +8596,14 @@ public async Task Max_Selector_Int64_4() } [Fact] - public async Task Max_AsyncSelector_Int64_4() + public async Task MaxAwaitAsync_Selector_Int64_4() { var input = new long[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8612,14 +8612,14 @@ public async Task Max_AsyncSelector_Int64_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_4() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_4() { var input = new long[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8628,7 +8628,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_4() #endif [Fact] - public async Task Max_Int64_Nullable_4_NoNull() + public async Task MaxAsync_Int64_Nullable_4_NoNull() { var input = new long?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -8643,7 +8643,7 @@ public async Task Max_Int64_Nullable_4_NoNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_4_NoNull() + public async Task MaxAsync_Selector_Int64_Nullable_4_NoNull() { var input = new long?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -8658,14 +8658,14 @@ public async Task Max_Selector_Int64_Nullable_4_NoNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_4_NoNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_4_NoNull() { var input = new long?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8674,14 +8674,14 @@ public async Task Max_AsyncSelector_Int64_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_4_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_4_NoNull() { var input = new long?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8690,7 +8690,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_4_NoNull() #endif [Fact] - public async Task Max_Int64_Nullable_4_AllNull() + public async Task MaxAsync_Int64_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(long?), 4); @@ -8700,7 +8700,7 @@ public async Task Max_Int64_Nullable_4_AllNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_4_AllNull() + public async Task MaxAsync_Selector_Int64_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(long?), 4); @@ -8710,29 +8710,29 @@ public async Task Max_Selector_Int64_Nullable_4_AllNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_4_AllNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(long?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_4_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(long?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Int64_Nullable_4_SomeNull() + public async Task MaxAsync_Int64_Nullable_4_SomeNull() { var input = new long?[] { -2, null, -61, null }.AsEnumerable(); @@ -8747,7 +8747,7 @@ public async Task Max_Int64_Nullable_4_SomeNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_4_SomeNull() + public async Task MaxAsync_Selector_Int64_Nullable_4_SomeNull() { var input = new long?[] { -2, null, -61, null }.AsEnumerable(); @@ -8762,14 +8762,14 @@ public async Task Max_Selector_Int64_Nullable_4_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_4_SomeNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_4_SomeNull() { var input = new long?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8778,14 +8778,14 @@ public async Task Max_AsyncSelector_Int64_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_4_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_4_SomeNull() { var input = new long?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8794,7 +8794,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_4_SomeNull() #endif [Fact] - public async Task Max_Int64_8() + public async Task MaxAsync_Int64_8() { var input = new long[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -8809,7 +8809,7 @@ public async Task Max_Int64_8() } [Fact] - public async Task Max_Selector_Int64_8() + public async Task MaxAsync_Selector_Int64_8() { var input = new long[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -8824,14 +8824,14 @@ public async Task Max_Selector_Int64_8() } [Fact] - public async Task Max_AsyncSelector_Int64_8() + public async Task MaxAwaitAsync_Selector_Int64_8() { var input = new long[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8840,14 +8840,14 @@ public async Task Max_AsyncSelector_Int64_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_8() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_8() { var input = new long[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8856,7 +8856,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_8() #endif [Fact] - public async Task Max_Int64_Nullable_8_NoNull() + public async Task MaxAsync_Int64_Nullable_8_NoNull() { var input = new long?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -8871,7 +8871,7 @@ public async Task Max_Int64_Nullable_8_NoNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_8_NoNull() + public async Task MaxAsync_Selector_Int64_Nullable_8_NoNull() { var input = new long?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -8886,14 +8886,14 @@ public async Task Max_Selector_Int64_Nullable_8_NoNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_8_NoNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_8_NoNull() { var input = new long?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8902,14 +8902,14 @@ public async Task Max_AsyncSelector_Int64_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_8_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_8_NoNull() { var input = new long?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -8918,7 +8918,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_8_NoNull() #endif [Fact] - public async Task Max_Int64_Nullable_8_AllNull() + public async Task MaxAsync_Int64_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(long?), 8); @@ -8928,7 +8928,7 @@ public async Task Max_Int64_Nullable_8_AllNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_8_AllNull() + public async Task MaxAsync_Selector_Int64_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(long?), 8); @@ -8938,29 +8938,29 @@ public async Task Max_Selector_Int64_Nullable_8_AllNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_8_AllNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(long?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_8_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(long?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Int64_Nullable_8_SomeNull() + public async Task MaxAsync_Int64_Nullable_8_SomeNull() { var input = new long?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -8975,7 +8975,7 @@ public async Task Max_Int64_Nullable_8_SomeNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_8_SomeNull() + public async Task MaxAsync_Selector_Int64_Nullable_8_SomeNull() { var input = new long?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -8990,14 +8990,14 @@ public async Task Max_Selector_Int64_Nullable_8_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_8_SomeNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_8_SomeNull() { var input = new long?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9006,14 +9006,14 @@ public async Task Max_AsyncSelector_Int64_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_8_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_8_SomeNull() { var input = new long?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9022,7 +9022,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_8_SomeNull() #endif [Fact] - public async Task Max_Int64_16() + public async Task MaxAsync_Int64_16() { var input = new long[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -9037,7 +9037,7 @@ public async Task Max_Int64_16() } [Fact] - public async Task Max_Selector_Int64_16() + public async Task MaxAsync_Selector_Int64_16() { var input = new long[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -9052,14 +9052,14 @@ public async Task Max_Selector_Int64_16() } [Fact] - public async Task Max_AsyncSelector_Int64_16() + public async Task MaxAwaitAsync_Selector_Int64_16() { var input = new long[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9068,14 +9068,14 @@ public async Task Max_AsyncSelector_Int64_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_16() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_16() { var input = new long[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9084,7 +9084,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_16() #endif [Fact] - public async Task Max_Int64_Nullable_16_NoNull() + public async Task MaxAsync_Int64_Nullable_16_NoNull() { var input = new long?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -9099,7 +9099,7 @@ public async Task Max_Int64_Nullable_16_NoNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_16_NoNull() + public async Task MaxAsync_Selector_Int64_Nullable_16_NoNull() { var input = new long?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -9114,14 +9114,14 @@ public async Task Max_Selector_Int64_Nullable_16_NoNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_16_NoNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_16_NoNull() { var input = new long?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9130,14 +9130,14 @@ public async Task Max_AsyncSelector_Int64_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_16_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_16_NoNull() { var input = new long?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9146,7 +9146,7 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_16_NoNull() #endif [Fact] - public async Task Max_Int64_Nullable_16_AllNull() + public async Task MaxAsync_Int64_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(long?), 16); @@ -9156,7 +9156,7 @@ public async Task Max_Int64_Nullable_16_AllNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_16_AllNull() + public async Task MaxAsync_Selector_Int64_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(long?), 16); @@ -9166,29 +9166,29 @@ public async Task Max_Selector_Int64_Nullable_16_AllNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_16_AllNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(long?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_16_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(long?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Int64_Nullable_16_SomeNull() + public async Task MaxAsync_Int64_Nullable_16_SomeNull() { var input = new long?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -9203,7 +9203,7 @@ public async Task Max_Int64_Nullable_16_SomeNull() } [Fact] - public async Task Max_Selector_Int64_Nullable_16_SomeNull() + public async Task MaxAsync_Selector_Int64_Nullable_16_SomeNull() { var input = new long?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -9218,14 +9218,14 @@ public async Task Max_Selector_Int64_Nullable_16_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Int64_Nullable_16_SomeNull() + public async Task MaxAwaitAsync_Selector_Int64_Nullable_16_SomeNull() { var input = new long?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9234,14 +9234,14 @@ public async Task Max_AsyncSelector_Int64_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_16_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Int64_Nullable_16_SomeNull() { var input = new long?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9250,59 +9250,59 @@ public async Task Max_AsyncSelectorWithCancellation_Int64_Nullable_16_SomeNull() #endif [Fact] - public async Task Max_Empty_Single() + public async Task MaxAsync_Empty_Single() { await AssertThrowsAsync(new float[0].ToAsyncEnumerable().MaxAsync(CancellationToken.None).AsTask()); } [Fact] - public async Task Max_Selector_Empty_Single() + public async Task MaxAsync_Selector_Empty_Single() { await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync(_ => default(float), CancellationToken.None).AsTask()); } [Fact] - public async Task Max_AsyncSelector_Empty_Single() + public async Task MaxAwaitAsync_Selector_Empty_Single() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAwaitAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Empty_Single() + public async Task MaxAwaitWithCancellationAsync_Selector_Empty_Single() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); } #endif [Fact] - public async Task Max_Empty_Nullable_Single() + public async Task MaxAsync_Empty_Nullable_Single() { Assert.Null(await new float?[0].ToAsyncEnumerable().MaxAsync(CancellationToken.None)); } [Fact] - public async Task Max_Selector_Empty_Nullable_Single() + public async Task MaxAsync_Selector_Empty_Nullable_Single() { Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync(_ => default(float?), CancellationToken.None)); } [Fact] - public async Task Max_AsyncSelector_Empty_Nullable_Single() + public async Task MaxAwaitAsync_Selector_Empty_Nullable_Single() { - Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync(_ => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MaxAwaitAsync(_ => default(ValueTask), CancellationToken.None)); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Empty_Nullable_Single() + public async Task MaxAwaitWithCancellationAsync_Selector_Empty_Nullable_Single() { - Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync((x, ct) => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None)); } #endif [Fact] - public async Task Max_Single_1() + public async Task MaxAsync_Single_1() { var input = new float[] { 33 }.AsEnumerable(); @@ -9317,7 +9317,7 @@ public async Task Max_Single_1() } [Fact] - public async Task Max_Selector_Single_1() + public async Task MaxAsync_Selector_Single_1() { var input = new float[] { 33 }.AsEnumerable(); @@ -9332,14 +9332,14 @@ public async Task Max_Selector_Single_1() } [Fact] - public async Task Max_AsyncSelector_Single_1() + public async Task MaxAwaitAsync_Selector_Single_1() { var input = new float[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9348,14 +9348,14 @@ public async Task Max_AsyncSelector_Single_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_1() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_1() { var input = new float[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9364,7 +9364,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_1() #endif [Fact] - public async Task Max_Single_Nullable_1_NoNull() + public async Task MaxAsync_Single_Nullable_1_NoNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -9379,7 +9379,7 @@ public async Task Max_Single_Nullable_1_NoNull() } [Fact] - public async Task Max_Selector_Single_Nullable_1_NoNull() + public async Task MaxAsync_Selector_Single_Nullable_1_NoNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -9394,14 +9394,14 @@ public async Task Max_Selector_Single_Nullable_1_NoNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_1_NoNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_1_NoNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9410,14 +9410,14 @@ public async Task Max_AsyncSelector_Single_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_1_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_1_NoNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9426,7 +9426,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_1_NoNull() #endif [Fact] - public async Task Max_Single_Nullable_1_AllNull() + public async Task MaxAsync_Single_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); @@ -9436,7 +9436,7 @@ public async Task Max_Single_Nullable_1_AllNull() } [Fact] - public async Task Max_Selector_Single_Nullable_1_AllNull() + public async Task MaxAsync_Selector_Single_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); @@ -9446,29 +9446,29 @@ public async Task Max_Selector_Single_Nullable_1_AllNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_1_AllNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_1_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_Nullable_1_SomeNull() + public async Task MaxAsync_Single_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -9483,7 +9483,7 @@ public async Task Max_Single_Nullable_1_SomeNull() } [Fact] - public async Task Max_Selector_Single_Nullable_1_SomeNull() + public async Task MaxAsync_Selector_Single_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -9498,14 +9498,14 @@ public async Task Max_Selector_Single_Nullable_1_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_1_SomeNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9514,14 +9514,14 @@ public async Task Max_AsyncSelector_Single_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_1_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9530,7 +9530,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_1_SomeNull() #endif [Fact] - public async Task Max_Single_4() + public async Task MaxAsync_Single_4() { var input = new float[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -9545,7 +9545,7 @@ public async Task Max_Single_4() } [Fact] - public async Task Max_Selector_Single_4() + public async Task MaxAsync_Selector_Single_4() { var input = new float[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -9560,14 +9560,14 @@ public async Task Max_Selector_Single_4() } [Fact] - public async Task Max_AsyncSelector_Single_4() + public async Task MaxAwaitAsync_Selector_Single_4() { var input = new float[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9576,14 +9576,14 @@ public async Task Max_AsyncSelector_Single_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_4() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_4() { var input = new float[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9592,7 +9592,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_4() #endif [Fact] - public async Task Max_Single_Nullable_4_NoNull() + public async Task MaxAsync_Single_Nullable_4_NoNull() { var input = new float?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -9607,7 +9607,7 @@ public async Task Max_Single_Nullable_4_NoNull() } [Fact] - public async Task Max_Selector_Single_Nullable_4_NoNull() + public async Task MaxAsync_Selector_Single_Nullable_4_NoNull() { var input = new float?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -9622,14 +9622,14 @@ public async Task Max_Selector_Single_Nullable_4_NoNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_4_NoNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_4_NoNull() { var input = new float?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9638,14 +9638,14 @@ public async Task Max_AsyncSelector_Single_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_4_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_4_NoNull() { var input = new float?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9654,7 +9654,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_4_NoNull() #endif [Fact] - public async Task Max_Single_Nullable_4_AllNull() + public async Task MaxAsync_Single_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); @@ -9664,7 +9664,7 @@ public async Task Max_Single_Nullable_4_AllNull() } [Fact] - public async Task Max_Selector_Single_Nullable_4_AllNull() + public async Task MaxAsync_Selector_Single_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); @@ -9674,29 +9674,29 @@ public async Task Max_Selector_Single_Nullable_4_AllNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_4_AllNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_4_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_Nullable_4_SomeNull() + public async Task MaxAsync_Single_Nullable_4_SomeNull() { var input = new float?[] { -2, null, -61, null }.AsEnumerable(); @@ -9711,7 +9711,7 @@ public async Task Max_Single_Nullable_4_SomeNull() } [Fact] - public async Task Max_Selector_Single_Nullable_4_SomeNull() + public async Task MaxAsync_Selector_Single_Nullable_4_SomeNull() { var input = new float?[] { -2, null, -61, null }.AsEnumerable(); @@ -9726,14 +9726,14 @@ public async Task Max_Selector_Single_Nullable_4_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_4_SomeNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_4_SomeNull() { var input = new float?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9742,14 +9742,14 @@ public async Task Max_AsyncSelector_Single_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_4_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_4_SomeNull() { var input = new float?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9758,7 +9758,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_4_SomeNull() #endif [Fact] - public async Task Max_Single_8() + public async Task MaxAsync_Single_8() { var input = new float[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -9773,7 +9773,7 @@ public async Task Max_Single_8() } [Fact] - public async Task Max_Selector_Single_8() + public async Task MaxAsync_Selector_Single_8() { var input = new float[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -9788,14 +9788,14 @@ public async Task Max_Selector_Single_8() } [Fact] - public async Task Max_AsyncSelector_Single_8() + public async Task MaxAwaitAsync_Selector_Single_8() { var input = new float[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9804,14 +9804,14 @@ public async Task Max_AsyncSelector_Single_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_8() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_8() { var input = new float[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9820,7 +9820,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_8() #endif [Fact] - public async Task Max_Single_Nullable_8_NoNull() + public async Task MaxAsync_Single_Nullable_8_NoNull() { var input = new float?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -9835,7 +9835,7 @@ public async Task Max_Single_Nullable_8_NoNull() } [Fact] - public async Task Max_Selector_Single_Nullable_8_NoNull() + public async Task MaxAsync_Selector_Single_Nullable_8_NoNull() { var input = new float?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -9850,14 +9850,14 @@ public async Task Max_Selector_Single_Nullable_8_NoNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_8_NoNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_8_NoNull() { var input = new float?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9866,14 +9866,14 @@ public async Task Max_AsyncSelector_Single_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_8_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_8_NoNull() { var input = new float?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9882,7 +9882,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_8_NoNull() #endif [Fact] - public async Task Max_Single_Nullable_8_AllNull() + public async Task MaxAsync_Single_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); @@ -9892,7 +9892,7 @@ public async Task Max_Single_Nullable_8_AllNull() } [Fact] - public async Task Max_Selector_Single_Nullable_8_AllNull() + public async Task MaxAsync_Selector_Single_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); @@ -9902,29 +9902,29 @@ public async Task Max_Selector_Single_Nullable_8_AllNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_8_AllNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_8_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_Nullable_8_SomeNull() + public async Task MaxAsync_Single_Nullable_8_SomeNull() { var input = new float?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -9939,7 +9939,7 @@ public async Task Max_Single_Nullable_8_SomeNull() } [Fact] - public async Task Max_Selector_Single_Nullable_8_SomeNull() + public async Task MaxAsync_Selector_Single_Nullable_8_SomeNull() { var input = new float?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -9954,14 +9954,14 @@ public async Task Max_Selector_Single_Nullable_8_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_8_SomeNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_8_SomeNull() { var input = new float?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9970,14 +9970,14 @@ public async Task Max_AsyncSelector_Single_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_8_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_8_SomeNull() { var input = new float?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -9986,7 +9986,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_8_SomeNull() #endif [Fact] - public async Task Max_Single_16() + public async Task MaxAsync_Single_16() { var input = new float[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -10001,7 +10001,7 @@ public async Task Max_Single_16() } [Fact] - public async Task Max_Selector_Single_16() + public async Task MaxAsync_Selector_Single_16() { var input = new float[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -10016,14 +10016,14 @@ public async Task Max_Selector_Single_16() } [Fact] - public async Task Max_AsyncSelector_Single_16() + public async Task MaxAwaitAsync_Selector_Single_16() { var input = new float[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10032,14 +10032,14 @@ public async Task Max_AsyncSelector_Single_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_16() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_16() { var input = new float[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10048,7 +10048,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_16() #endif [Fact] - public async Task Max_Single_Nullable_16_NoNull() + public async Task MaxAsync_Single_Nullable_16_NoNull() { var input = new float?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -10063,7 +10063,7 @@ public async Task Max_Single_Nullable_16_NoNull() } [Fact] - public async Task Max_Selector_Single_Nullable_16_NoNull() + public async Task MaxAsync_Selector_Single_Nullable_16_NoNull() { var input = new float?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -10078,14 +10078,14 @@ public async Task Max_Selector_Single_Nullable_16_NoNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_16_NoNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_16_NoNull() { var input = new float?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10094,14 +10094,14 @@ public async Task Max_AsyncSelector_Single_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_16_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_16_NoNull() { var input = new float?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10110,7 +10110,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_16_NoNull() #endif [Fact] - public async Task Max_Single_Nullable_16_AllNull() + public async Task MaxAsync_Single_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); @@ -10120,7 +10120,7 @@ public async Task Max_Single_Nullable_16_AllNull() } [Fact] - public async Task Max_Selector_Single_Nullable_16_AllNull() + public async Task MaxAsync_Selector_Single_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); @@ -10130,29 +10130,29 @@ public async Task Max_Selector_Single_Nullable_16_AllNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_16_AllNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_16_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_Nullable_16_SomeNull() + public async Task MaxAsync_Single_Nullable_16_SomeNull() { var input = new float?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -10167,7 +10167,7 @@ public async Task Max_Single_Nullable_16_SomeNull() } [Fact] - public async Task Max_Selector_Single_Nullable_16_SomeNull() + public async Task MaxAsync_Selector_Single_Nullable_16_SomeNull() { var input = new float?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -10182,14 +10182,14 @@ public async Task Max_Selector_Single_Nullable_16_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Single_Nullable_16_SomeNull() + public async Task MaxAwaitAsync_Selector_Single_Nullable_16_SomeNull() { var input = new float?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10198,14 +10198,14 @@ public async Task Max_AsyncSelector_Single_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_16_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_Nullable_16_SomeNull() { var input = new float?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10214,7 +10214,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_Nullable_16_SomeNull( #endif [Fact] - public async Task Max_Single_WithNaN_1() + public async Task MaxAsync_Single_WithNaN_1() { var input = new float[] { float.NaN }.AsEnumerable(); @@ -10229,7 +10229,7 @@ public async Task Max_Single_WithNaN_1() } [Fact] - public async Task Max_Selector_Single_WithNaN_1() + public async Task MaxAsync_Selector_Single_WithNaN_1() { var input = new float[] { float.NaN }.AsEnumerable(); @@ -10244,14 +10244,14 @@ public async Task Max_Selector_Single_WithNaN_1() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_1() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_1() { var input = new float[] { float.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10260,14 +10260,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_1() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_1() { var input = new float[] { float.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10276,7 +10276,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_1() #endif [Fact] - public async Task Max_Single_WithNaN_1_AllNaN() + public async Task MaxAsync_Single_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); @@ -10286,7 +10286,7 @@ public async Task Max_Single_WithNaN_1_AllNaN() } [Fact] - public async Task Max_Selector_Single_WithNaN_1_AllNaN() + public async Task MaxAsync_Selector_Single_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); @@ -10296,29 +10296,29 @@ public async Task Max_Selector_Single_WithNaN_1_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_1_AllNaN() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_1_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_1_NoNull() + public async Task MaxAsync_Single_WithNaN_Nullable_1_NoNull() { var input = new float?[] { float.NaN }.AsEnumerable(); @@ -10333,7 +10333,7 @@ public async Task Max_Single_WithNaN_Nullable_1_NoNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_1_NoNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_1_NoNull() { var input = new float?[] { float.NaN }.AsEnumerable(); @@ -10348,14 +10348,14 @@ public async Task Max_Selector_Single_WithNaN_Nullable_1_NoNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_1_NoNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_1_NoNull() { var input = new float?[] { float.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10364,14 +10364,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_1_NoNull() { var input = new float?[] { float.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10380,7 +10380,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_No #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_1_AllNull() + public async Task MaxAsync_Single_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); @@ -10390,7 +10390,7 @@ public async Task Max_Single_WithNaN_Nullable_1_AllNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_1_AllNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); @@ -10400,29 +10400,29 @@ public async Task Max_Selector_Single_WithNaN_Nullable_1_AllNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_1_AllNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(float?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_1_AllNaN() + public async Task MaxAsync_Single_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); @@ -10432,7 +10432,7 @@ public async Task Max_Single_WithNaN_Nullable_1_AllNaN() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_1_AllNaN() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); @@ -10442,29 +10442,29 @@ public async Task Max_Selector_Single_WithNaN_Nullable_1_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_1_AllNaN() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(float.NaN, 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_1_SomeNull() + public async Task MaxAsync_Single_WithNaN_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -10479,7 +10479,7 @@ public async Task Max_Single_WithNaN_Nullable_1_SomeNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_1_SomeNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); @@ -10494,14 +10494,14 @@ public async Task Max_Selector_Single_WithNaN_Nullable_1_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_1_SomeNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10510,14 +10510,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_1_SomeNull() { var input = new float?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10525,7 +10525,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_1_So } #endif [Fact] - public async Task Max_Single_WithNaN_4() + public async Task MaxAsync_Single_WithNaN_4() { var input = new float[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); @@ -10540,7 +10540,7 @@ public async Task Max_Single_WithNaN_4() } [Fact] - public async Task Max_Selector_Single_WithNaN_4() + public async Task MaxAsync_Selector_Single_WithNaN_4() { var input = new float[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); @@ -10555,14 +10555,14 @@ public async Task Max_Selector_Single_WithNaN_4() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_4() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_4() { var input = new float[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10571,14 +10571,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_4() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_4() { var input = new float[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10587,7 +10587,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_4() #endif [Fact] - public async Task Max_Single_WithNaN_4_AllNaN() + public async Task MaxAsync_Single_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); @@ -10597,7 +10597,7 @@ public async Task Max_Single_WithNaN_4_AllNaN() } [Fact] - public async Task Max_Selector_Single_WithNaN_4_AllNaN() + public async Task MaxAsync_Selector_Single_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); @@ -10607,29 +10607,29 @@ public async Task Max_Selector_Single_WithNaN_4_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_4_AllNaN() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_4_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_4_NoNull() + public async Task MaxAsync_Single_WithNaN_Nullable_4_NoNull() { var input = new float?[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); @@ -10644,7 +10644,7 @@ public async Task Max_Single_WithNaN_Nullable_4_NoNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_4_NoNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_4_NoNull() { var input = new float?[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); @@ -10659,14 +10659,14 @@ public async Task Max_Selector_Single_WithNaN_Nullable_4_NoNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_4_NoNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_4_NoNull() { var input = new float?[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10675,14 +10675,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_4_NoNull() { var input = new float?[] { float.NaN, -78, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10691,7 +10691,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_No #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_4_AllNull() + public async Task MaxAsync_Single_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); @@ -10701,7 +10701,7 @@ public async Task Max_Single_WithNaN_Nullable_4_AllNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_4_AllNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); @@ -10711,29 +10711,29 @@ public async Task Max_Selector_Single_WithNaN_Nullable_4_AllNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_4_AllNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(float?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_4_AllNaN() + public async Task MaxAsync_Single_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); @@ -10743,7 +10743,7 @@ public async Task Max_Single_WithNaN_Nullable_4_AllNaN() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_4_AllNaN() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); @@ -10753,29 +10753,29 @@ public async Task Max_Selector_Single_WithNaN_Nullable_4_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_4_AllNaN() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(float.NaN, 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_4_SomeNull() + public async Task MaxAsync_Single_WithNaN_Nullable_4_SomeNull() { var input = new float?[] { -2, null, float.NaN, -17 }.AsEnumerable(); @@ -10790,7 +10790,7 @@ public async Task Max_Single_WithNaN_Nullable_4_SomeNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_4_SomeNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_4_SomeNull() { var input = new float?[] { -2, null, float.NaN, -17 }.AsEnumerable(); @@ -10805,14 +10805,14 @@ public async Task Max_Selector_Single_WithNaN_Nullable_4_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_4_SomeNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_4_SomeNull() { var input = new float?[] { -2, null, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10821,14 +10821,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_4_SomeNull() { var input = new float?[] { -2, null, float.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10836,7 +10836,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_4_So } #endif [Fact] - public async Task Max_Single_WithNaN_8() + public async Task MaxAsync_Single_WithNaN_8() { var input = new float[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); @@ -10851,7 +10851,7 @@ public async Task Max_Single_WithNaN_8() } [Fact] - public async Task Max_Selector_Single_WithNaN_8() + public async Task MaxAsync_Selector_Single_WithNaN_8() { var input = new float[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); @@ -10866,14 +10866,14 @@ public async Task Max_Selector_Single_WithNaN_8() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_8() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_8() { var input = new float[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10882,14 +10882,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_8() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_8() { var input = new float[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10898,7 +10898,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_8() #endif [Fact] - public async Task Max_Single_WithNaN_8_AllNaN() + public async Task MaxAsync_Single_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); @@ -10908,7 +10908,7 @@ public async Task Max_Single_WithNaN_8_AllNaN() } [Fact] - public async Task Max_Selector_Single_WithNaN_8_AllNaN() + public async Task MaxAsync_Selector_Single_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); @@ -10918,29 +10918,29 @@ public async Task Max_Selector_Single_WithNaN_8_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_8_AllNaN() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_8_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_8_NoNull() + public async Task MaxAsync_Single_WithNaN_Nullable_8_NoNull() { var input = new float?[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); @@ -10955,7 +10955,7 @@ public async Task Max_Single_WithNaN_Nullable_8_NoNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_8_NoNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_8_NoNull() { var input = new float?[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); @@ -10970,14 +10970,14 @@ public async Task Max_Selector_Single_WithNaN_Nullable_8_NoNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_8_NoNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_8_NoNull() { var input = new float?[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -10986,14 +10986,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_8_NoNull() { var input = new float?[] { float.NaN, -19, float.NaN, -46, float.NaN, -63, float.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11002,7 +11002,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_No #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_8_AllNull() + public async Task MaxAsync_Single_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); @@ -11012,7 +11012,7 @@ public async Task Max_Single_WithNaN_Nullable_8_AllNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_8_AllNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); @@ -11022,29 +11022,29 @@ public async Task Max_Selector_Single_WithNaN_Nullable_8_AllNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_8_AllNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(float?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_8_AllNaN() + public async Task MaxAsync_Single_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); @@ -11054,7 +11054,7 @@ public async Task Max_Single_WithNaN_Nullable_8_AllNaN() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_8_AllNaN() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); @@ -11064,29 +11064,29 @@ public async Task Max_Selector_Single_WithNaN_Nullable_8_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_8_AllNaN() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(float.NaN, 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_8_SomeNull() + public async Task MaxAsync_Single_WithNaN_Nullable_8_SomeNull() { var input = new float?[] { -48, null, float.NaN, -46, null, float.NaN, -10, null }.AsEnumerable(); @@ -11101,7 +11101,7 @@ public async Task Max_Single_WithNaN_Nullable_8_SomeNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_8_SomeNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_8_SomeNull() { var input = new float?[] { -48, null, float.NaN, -46, null, float.NaN, -10, null }.AsEnumerable(); @@ -11116,14 +11116,14 @@ public async Task Max_Selector_Single_WithNaN_Nullable_8_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_8_SomeNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_8_SomeNull() { var input = new float?[] { -48, null, float.NaN, -46, null, float.NaN, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11132,14 +11132,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_8_SomeNull() { var input = new float?[] { -48, null, float.NaN, -46, null, float.NaN, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11147,7 +11147,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_8_So } #endif [Fact] - public async Task Max_Single_WithNaN_16() + public async Task MaxAsync_Single_WithNaN_16() { var input = new float[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); @@ -11162,7 +11162,7 @@ public async Task Max_Single_WithNaN_16() } [Fact] - public async Task Max_Selector_Single_WithNaN_16() + public async Task MaxAsync_Selector_Single_WithNaN_16() { var input = new float[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); @@ -11177,14 +11177,14 @@ public async Task Max_Selector_Single_WithNaN_16() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_16() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_16() { var input = new float[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11193,14 +11193,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_16() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_16() { var input = new float[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11209,7 +11209,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_16() #endif [Fact] - public async Task Max_Single_WithNaN_16_AllNaN() + public async Task MaxAsync_Single_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); @@ -11219,7 +11219,7 @@ public async Task Max_Single_WithNaN_16_AllNaN() } [Fact] - public async Task Max_Selector_Single_WithNaN_16_AllNaN() + public async Task MaxAsync_Selector_Single_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); @@ -11229,29 +11229,29 @@ public async Task Max_Selector_Single_WithNaN_16_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_16_AllNaN() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_16_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_16_NoNull() + public async Task MaxAsync_Single_WithNaN_Nullable_16_NoNull() { var input = new float?[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); @@ -11266,7 +11266,7 @@ public async Task Max_Single_WithNaN_Nullable_16_NoNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_16_NoNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_16_NoNull() { var input = new float?[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); @@ -11281,14 +11281,14 @@ public async Task Max_Selector_Single_WithNaN_Nullable_16_NoNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_16_NoNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_16_NoNull() { var input = new float?[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11297,14 +11297,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_16_NoNull() { var input = new float?[] { float.NaN, 98, float.NaN, 98, float.NaN, 63, float.NaN, 14, float.NaN, -86, float.NaN, -79, float.NaN, -84, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11313,7 +11313,7 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_N #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_16_AllNull() + public async Task MaxAsync_Single_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); @@ -11323,7 +11323,7 @@ public async Task Max_Single_WithNaN_Nullable_16_AllNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_16_AllNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); @@ -11333,29 +11333,29 @@ public async Task Max_Selector_Single_WithNaN_Nullable_16_AllNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_16_AllNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(float?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_16_AllNaN() + public async Task MaxAsync_Single_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); @@ -11365,7 +11365,7 @@ public async Task Max_Single_WithNaN_Nullable_16_AllNaN() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_16_AllNaN() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); @@ -11375,29 +11375,29 @@ public async Task Max_Selector_Single_WithNaN_Nullable_16_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_16_AllNaN() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(float.NaN, 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Single_WithNaN_Nullable_16_SomeNull() + public async Task MaxAsync_Single_WithNaN_Nullable_16_SomeNull() { var input = new float?[] { 59, null, float.NaN, 98, null, float.NaN, -100, null, float.NaN, -86, null, float.NaN, 19, null, float.NaN, 41 }.AsEnumerable(); @@ -11412,7 +11412,7 @@ public async Task Max_Single_WithNaN_Nullable_16_SomeNull() } [Fact] - public async Task Max_Selector_Single_WithNaN_Nullable_16_SomeNull() + public async Task MaxAsync_Selector_Single_WithNaN_Nullable_16_SomeNull() { var input = new float?[] { 59, null, float.NaN, 98, null, float.NaN, -100, null, float.NaN, -86, null, float.NaN, 19, null, float.NaN, 41 }.AsEnumerable(); @@ -11427,14 +11427,14 @@ public async Task Max_Selector_Single_WithNaN_Nullable_16_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Single_WithNaN_Nullable_16_SomeNull() + public async Task MaxAwaitAsync_Selector_Single_WithNaN_Nullable_16_SomeNull() { var input = new float?[] { 59, null, float.NaN, 98, null, float.NaN, -100, null, float.NaN, -86, null, float.NaN, 19, null, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11443,14 +11443,14 @@ public async Task Max_AsyncSelector_Single_WithNaN_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Single_WithNaN_Nullable_16_SomeNull() { var input = new float?[] { 59, null, float.NaN, 98, null, float.NaN, -100, null, float.NaN, -86, null, float.NaN, 19, null, float.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11458,59 +11458,59 @@ public async Task Max_AsyncSelectorWithCancellation_Single_WithNaN_Nullable_16_S } #endif [Fact] - public async Task Max_Empty_Double() + public async Task MaxAsync_Empty_Double() { await AssertThrowsAsync(new double[0].ToAsyncEnumerable().MaxAsync(CancellationToken.None).AsTask()); } [Fact] - public async Task Max_Selector_Empty_Double() + public async Task MaxAsync_Selector_Empty_Double() { await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync(_ => default(double), CancellationToken.None).AsTask()); } [Fact] - public async Task Max_AsyncSelector_Empty_Double() + public async Task MaxAwaitAsync_Selector_Empty_Double() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAwaitAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Empty_Double() + public async Task MaxAwaitWithCancellationAsync_Selector_Empty_Double() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); } #endif [Fact] - public async Task Max_Empty_Nullable_Double() + public async Task MaxAsync_Empty_Nullable_Double() { Assert.Null(await new double?[0].ToAsyncEnumerable().MaxAsync(CancellationToken.None)); } [Fact] - public async Task Max_Selector_Empty_Nullable_Double() + public async Task MaxAsync_Selector_Empty_Nullable_Double() { Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync(_ => default(double?), CancellationToken.None)); } [Fact] - public async Task Max_AsyncSelector_Empty_Nullable_Double() + public async Task MaxAwaitAsync_Selector_Empty_Nullable_Double() { - Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync(_ => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MaxAwaitAsync(_ => default(ValueTask), CancellationToken.None)); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Empty_Nullable_Double() + public async Task MaxAwaitWithCancellationAsync_Selector_Empty_Nullable_Double() { - Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync((x, ct) => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None)); } #endif [Fact] - public async Task Max_Double_1() + public async Task MaxAsync_Double_1() { var input = new double[] { 33 }.AsEnumerable(); @@ -11525,7 +11525,7 @@ public async Task Max_Double_1() } [Fact] - public async Task Max_Selector_Double_1() + public async Task MaxAsync_Selector_Double_1() { var input = new double[] { 33 }.AsEnumerable(); @@ -11540,14 +11540,14 @@ public async Task Max_Selector_Double_1() } [Fact] - public async Task Max_AsyncSelector_Double_1() + public async Task MaxAwaitAsync_Selector_Double_1() { var input = new double[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11556,14 +11556,14 @@ public async Task Max_AsyncSelector_Double_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_1() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_1() { var input = new double[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11572,7 +11572,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_1() #endif [Fact] - public async Task Max_Double_Nullable_1_NoNull() + public async Task MaxAsync_Double_Nullable_1_NoNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -11587,7 +11587,7 @@ public async Task Max_Double_Nullable_1_NoNull() } [Fact] - public async Task Max_Selector_Double_Nullable_1_NoNull() + public async Task MaxAsync_Selector_Double_Nullable_1_NoNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -11602,14 +11602,14 @@ public async Task Max_Selector_Double_Nullable_1_NoNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_1_NoNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_1_NoNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11618,14 +11618,14 @@ public async Task Max_AsyncSelector_Double_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_1_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_1_NoNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11634,7 +11634,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_1_NoNull() #endif [Fact] - public async Task Max_Double_Nullable_1_AllNull() + public async Task MaxAsync_Double_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); @@ -11644,7 +11644,7 @@ public async Task Max_Double_Nullable_1_AllNull() } [Fact] - public async Task Max_Selector_Double_Nullable_1_AllNull() + public async Task MaxAsync_Selector_Double_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); @@ -11654,29 +11654,29 @@ public async Task Max_Selector_Double_Nullable_1_AllNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_1_AllNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_1_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_Nullable_1_SomeNull() + public async Task MaxAsync_Double_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -11691,7 +11691,7 @@ public async Task Max_Double_Nullable_1_SomeNull() } [Fact] - public async Task Max_Selector_Double_Nullable_1_SomeNull() + public async Task MaxAsync_Selector_Double_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -11706,14 +11706,14 @@ public async Task Max_Selector_Double_Nullable_1_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_1_SomeNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11722,14 +11722,14 @@ public async Task Max_AsyncSelector_Double_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_1_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11738,7 +11738,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_1_SomeNull() #endif [Fact] - public async Task Max_Double_4() + public async Task MaxAsync_Double_4() { var input = new double[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -11753,7 +11753,7 @@ public async Task Max_Double_4() } [Fact] - public async Task Max_Selector_Double_4() + public async Task MaxAsync_Selector_Double_4() { var input = new double[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -11768,14 +11768,14 @@ public async Task Max_Selector_Double_4() } [Fact] - public async Task Max_AsyncSelector_Double_4() + public async Task MaxAwaitAsync_Selector_Double_4() { var input = new double[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11784,14 +11784,14 @@ public async Task Max_AsyncSelector_Double_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_4() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_4() { var input = new double[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11800,7 +11800,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_4() #endif [Fact] - public async Task Max_Double_Nullable_4_NoNull() + public async Task MaxAsync_Double_Nullable_4_NoNull() { var input = new double?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -11815,7 +11815,7 @@ public async Task Max_Double_Nullable_4_NoNull() } [Fact] - public async Task Max_Selector_Double_Nullable_4_NoNull() + public async Task MaxAsync_Selector_Double_Nullable_4_NoNull() { var input = new double?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -11830,14 +11830,14 @@ public async Task Max_Selector_Double_Nullable_4_NoNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_4_NoNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_4_NoNull() { var input = new double?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11846,14 +11846,14 @@ public async Task Max_AsyncSelector_Double_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_4_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_4_NoNull() { var input = new double?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11862,7 +11862,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_4_NoNull() #endif [Fact] - public async Task Max_Double_Nullable_4_AllNull() + public async Task MaxAsync_Double_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); @@ -11872,7 +11872,7 @@ public async Task Max_Double_Nullable_4_AllNull() } [Fact] - public async Task Max_Selector_Double_Nullable_4_AllNull() + public async Task MaxAsync_Selector_Double_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); @@ -11882,29 +11882,29 @@ public async Task Max_Selector_Double_Nullable_4_AllNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_4_AllNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_4_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_Nullable_4_SomeNull() + public async Task MaxAsync_Double_Nullable_4_SomeNull() { var input = new double?[] { -2, null, -61, null }.AsEnumerable(); @@ -11919,7 +11919,7 @@ public async Task Max_Double_Nullable_4_SomeNull() } [Fact] - public async Task Max_Selector_Double_Nullable_4_SomeNull() + public async Task MaxAsync_Selector_Double_Nullable_4_SomeNull() { var input = new double?[] { -2, null, -61, null }.AsEnumerable(); @@ -11934,14 +11934,14 @@ public async Task Max_Selector_Double_Nullable_4_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_4_SomeNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_4_SomeNull() { var input = new double?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11950,14 +11950,14 @@ public async Task Max_AsyncSelector_Double_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_4_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_4_SomeNull() { var input = new double?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -11966,7 +11966,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_4_SomeNull() #endif [Fact] - public async Task Max_Double_8() + public async Task MaxAsync_Double_8() { var input = new double[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -11981,7 +11981,7 @@ public async Task Max_Double_8() } [Fact] - public async Task Max_Selector_Double_8() + public async Task MaxAsync_Selector_Double_8() { var input = new double[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -11996,14 +11996,14 @@ public async Task Max_Selector_Double_8() } [Fact] - public async Task Max_AsyncSelector_Double_8() + public async Task MaxAwaitAsync_Selector_Double_8() { var input = new double[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12012,14 +12012,14 @@ public async Task Max_AsyncSelector_Double_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_8() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_8() { var input = new double[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12028,7 +12028,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_8() #endif [Fact] - public async Task Max_Double_Nullable_8_NoNull() + public async Task MaxAsync_Double_Nullable_8_NoNull() { var input = new double?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -12043,7 +12043,7 @@ public async Task Max_Double_Nullable_8_NoNull() } [Fact] - public async Task Max_Selector_Double_Nullable_8_NoNull() + public async Task MaxAsync_Selector_Double_Nullable_8_NoNull() { var input = new double?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -12058,14 +12058,14 @@ public async Task Max_Selector_Double_Nullable_8_NoNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_8_NoNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_8_NoNull() { var input = new double?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12074,14 +12074,14 @@ public async Task Max_AsyncSelector_Double_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_8_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_8_NoNull() { var input = new double?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12090,7 +12090,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_8_NoNull() #endif [Fact] - public async Task Max_Double_Nullable_8_AllNull() + public async Task MaxAsync_Double_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); @@ -12100,7 +12100,7 @@ public async Task Max_Double_Nullable_8_AllNull() } [Fact] - public async Task Max_Selector_Double_Nullable_8_AllNull() + public async Task MaxAsync_Selector_Double_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); @@ -12110,29 +12110,29 @@ public async Task Max_Selector_Double_Nullable_8_AllNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_8_AllNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_8_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_Nullable_8_SomeNull() + public async Task MaxAsync_Double_Nullable_8_SomeNull() { var input = new double?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -12147,7 +12147,7 @@ public async Task Max_Double_Nullable_8_SomeNull() } [Fact] - public async Task Max_Selector_Double_Nullable_8_SomeNull() + public async Task MaxAsync_Selector_Double_Nullable_8_SomeNull() { var input = new double?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -12162,14 +12162,14 @@ public async Task Max_Selector_Double_Nullable_8_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_8_SomeNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_8_SomeNull() { var input = new double?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12178,14 +12178,14 @@ public async Task Max_AsyncSelector_Double_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_8_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_8_SomeNull() { var input = new double?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12194,7 +12194,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_8_SomeNull() #endif [Fact] - public async Task Max_Double_16() + public async Task MaxAsync_Double_16() { var input = new double[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -12209,7 +12209,7 @@ public async Task Max_Double_16() } [Fact] - public async Task Max_Selector_Double_16() + public async Task MaxAsync_Selector_Double_16() { var input = new double[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -12224,14 +12224,14 @@ public async Task Max_Selector_Double_16() } [Fact] - public async Task Max_AsyncSelector_Double_16() + public async Task MaxAwaitAsync_Selector_Double_16() { var input = new double[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12240,14 +12240,14 @@ public async Task Max_AsyncSelector_Double_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_16() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_16() { var input = new double[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12256,7 +12256,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_16() #endif [Fact] - public async Task Max_Double_Nullable_16_NoNull() + public async Task MaxAsync_Double_Nullable_16_NoNull() { var input = new double?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -12271,7 +12271,7 @@ public async Task Max_Double_Nullable_16_NoNull() } [Fact] - public async Task Max_Selector_Double_Nullable_16_NoNull() + public async Task MaxAsync_Selector_Double_Nullable_16_NoNull() { var input = new double?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -12286,14 +12286,14 @@ public async Task Max_Selector_Double_Nullable_16_NoNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_16_NoNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_16_NoNull() { var input = new double?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12302,14 +12302,14 @@ public async Task Max_AsyncSelector_Double_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_16_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_16_NoNull() { var input = new double?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12318,7 +12318,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_16_NoNull() #endif [Fact] - public async Task Max_Double_Nullable_16_AllNull() + public async Task MaxAsync_Double_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); @@ -12328,7 +12328,7 @@ public async Task Max_Double_Nullable_16_AllNull() } [Fact] - public async Task Max_Selector_Double_Nullable_16_AllNull() + public async Task MaxAsync_Selector_Double_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); @@ -12338,29 +12338,29 @@ public async Task Max_Selector_Double_Nullable_16_AllNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_16_AllNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_16_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_Nullable_16_SomeNull() + public async Task MaxAsync_Double_Nullable_16_SomeNull() { var input = new double?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -12375,7 +12375,7 @@ public async Task Max_Double_Nullable_16_SomeNull() } [Fact] - public async Task Max_Selector_Double_Nullable_16_SomeNull() + public async Task MaxAsync_Selector_Double_Nullable_16_SomeNull() { var input = new double?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -12390,14 +12390,14 @@ public async Task Max_Selector_Double_Nullable_16_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Double_Nullable_16_SomeNull() + public async Task MaxAwaitAsync_Selector_Double_Nullable_16_SomeNull() { var input = new double?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12406,14 +12406,14 @@ public async Task Max_AsyncSelector_Double_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_16_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_Nullable_16_SomeNull() { var input = new double?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12422,7 +12422,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_Nullable_16_SomeNull( #endif [Fact] - public async Task Max_Double_WithNaN_1() + public async Task MaxAsync_Double_WithNaN_1() { var input = new double[] { double.NaN }.AsEnumerable(); @@ -12437,7 +12437,7 @@ public async Task Max_Double_WithNaN_1() } [Fact] - public async Task Max_Selector_Double_WithNaN_1() + public async Task MaxAsync_Selector_Double_WithNaN_1() { var input = new double[] { double.NaN }.AsEnumerable(); @@ -12452,14 +12452,14 @@ public async Task Max_Selector_Double_WithNaN_1() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_1() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_1() { var input = new double[] { double.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12468,14 +12468,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_1() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_1() { var input = new double[] { double.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12484,7 +12484,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_1() #endif [Fact] - public async Task Max_Double_WithNaN_1_AllNaN() + public async Task MaxAsync_Double_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); @@ -12494,7 +12494,7 @@ public async Task Max_Double_WithNaN_1_AllNaN() } [Fact] - public async Task Max_Selector_Double_WithNaN_1_AllNaN() + public async Task MaxAsync_Selector_Double_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); @@ -12504,29 +12504,29 @@ public async Task Max_Selector_Double_WithNaN_1_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_1_AllNaN() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_1_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_1_NoNull() + public async Task MaxAsync_Double_WithNaN_Nullable_1_NoNull() { var input = new double?[] { double.NaN }.AsEnumerable(); @@ -12541,7 +12541,7 @@ public async Task Max_Double_WithNaN_Nullable_1_NoNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_1_NoNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_1_NoNull() { var input = new double?[] { double.NaN }.AsEnumerable(); @@ -12556,14 +12556,14 @@ public async Task Max_Selector_Double_WithNaN_Nullable_1_NoNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_1_NoNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_1_NoNull() { var input = new double?[] { double.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12572,14 +12572,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_1_NoNull() { var input = new double?[] { double.NaN }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12588,7 +12588,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_No #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_1_AllNull() + public async Task MaxAsync_Double_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); @@ -12598,7 +12598,7 @@ public async Task Max_Double_WithNaN_Nullable_1_AllNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_1_AllNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); @@ -12608,29 +12608,29 @@ public async Task Max_Selector_Double_WithNaN_Nullable_1_AllNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_1_AllNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(double?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_1_AllNaN() + public async Task MaxAsync_Double_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); @@ -12640,7 +12640,7 @@ public async Task Max_Double_WithNaN_Nullable_1_AllNaN() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_1_AllNaN() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); @@ -12650,29 +12650,29 @@ public async Task Max_Selector_Double_WithNaN_Nullable_1_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_1_AllNaN() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_1_AllNaN() { var input = Enumerable.Repeat(double.NaN, 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_1_SomeNull() + public async Task MaxAsync_Double_WithNaN_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -12687,7 +12687,7 @@ public async Task Max_Double_WithNaN_Nullable_1_SomeNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_1_SomeNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); @@ -12702,14 +12702,14 @@ public async Task Max_Selector_Double_WithNaN_Nullable_1_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_1_SomeNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12718,14 +12718,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_1_SomeNull() { var input = new double?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12733,7 +12733,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_1_So } #endif [Fact] - public async Task Max_Double_WithNaN_4() + public async Task MaxAsync_Double_WithNaN_4() { var input = new double[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); @@ -12748,7 +12748,7 @@ public async Task Max_Double_WithNaN_4() } [Fact] - public async Task Max_Selector_Double_WithNaN_4() + public async Task MaxAsync_Selector_Double_WithNaN_4() { var input = new double[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); @@ -12763,14 +12763,14 @@ public async Task Max_Selector_Double_WithNaN_4() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_4() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_4() { var input = new double[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12779,14 +12779,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_4() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_4() { var input = new double[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12795,7 +12795,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_4() #endif [Fact] - public async Task Max_Double_WithNaN_4_AllNaN() + public async Task MaxAsync_Double_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); @@ -12805,7 +12805,7 @@ public async Task Max_Double_WithNaN_4_AllNaN() } [Fact] - public async Task Max_Selector_Double_WithNaN_4_AllNaN() + public async Task MaxAsync_Selector_Double_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); @@ -12815,29 +12815,29 @@ public async Task Max_Selector_Double_WithNaN_4_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_4_AllNaN() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_4_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_4_NoNull() + public async Task MaxAsync_Double_WithNaN_Nullable_4_NoNull() { var input = new double?[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); @@ -12852,7 +12852,7 @@ public async Task Max_Double_WithNaN_Nullable_4_NoNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_4_NoNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_4_NoNull() { var input = new double?[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); @@ -12867,14 +12867,14 @@ public async Task Max_Selector_Double_WithNaN_Nullable_4_NoNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_4_NoNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_4_NoNull() { var input = new double?[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12883,14 +12883,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_4_NoNull() { var input = new double?[] { double.NaN, -78, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -12899,7 +12899,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_No #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_4_AllNull() + public async Task MaxAsync_Double_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); @@ -12909,7 +12909,7 @@ public async Task Max_Double_WithNaN_Nullable_4_AllNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_4_AllNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); @@ -12919,29 +12919,29 @@ public async Task Max_Selector_Double_WithNaN_Nullable_4_AllNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_4_AllNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(double?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_4_AllNaN() + public async Task MaxAsync_Double_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); @@ -12951,7 +12951,7 @@ public async Task Max_Double_WithNaN_Nullable_4_AllNaN() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_4_AllNaN() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); @@ -12961,29 +12961,29 @@ public async Task Max_Selector_Double_WithNaN_Nullable_4_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_4_AllNaN() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_4_AllNaN() { var input = Enumerable.Repeat(double.NaN, 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_4_SomeNull() + public async Task MaxAsync_Double_WithNaN_Nullable_4_SomeNull() { var input = new double?[] { -2, null, double.NaN, -17 }.AsEnumerable(); @@ -12998,7 +12998,7 @@ public async Task Max_Double_WithNaN_Nullable_4_SomeNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_4_SomeNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_4_SomeNull() { var input = new double?[] { -2, null, double.NaN, -17 }.AsEnumerable(); @@ -13013,14 +13013,14 @@ public async Task Max_Selector_Double_WithNaN_Nullable_4_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_4_SomeNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_4_SomeNull() { var input = new double?[] { -2, null, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13029,14 +13029,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_4_SomeNull() { var input = new double?[] { -2, null, double.NaN, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13044,7 +13044,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_4_So } #endif [Fact] - public async Task Max_Double_WithNaN_8() + public async Task MaxAsync_Double_WithNaN_8() { var input = new double[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); @@ -13059,7 +13059,7 @@ public async Task Max_Double_WithNaN_8() } [Fact] - public async Task Max_Selector_Double_WithNaN_8() + public async Task MaxAsync_Selector_Double_WithNaN_8() { var input = new double[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); @@ -13074,14 +13074,14 @@ public async Task Max_Selector_Double_WithNaN_8() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_8() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_8() { var input = new double[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13090,14 +13090,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_8() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_8() { var input = new double[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13106,7 +13106,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_8() #endif [Fact] - public async Task Max_Double_WithNaN_8_AllNaN() + public async Task MaxAsync_Double_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); @@ -13116,7 +13116,7 @@ public async Task Max_Double_WithNaN_8_AllNaN() } [Fact] - public async Task Max_Selector_Double_WithNaN_8_AllNaN() + public async Task MaxAsync_Selector_Double_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); @@ -13126,29 +13126,29 @@ public async Task Max_Selector_Double_WithNaN_8_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_8_AllNaN() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_8_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_8_NoNull() + public async Task MaxAsync_Double_WithNaN_Nullable_8_NoNull() { var input = new double?[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); @@ -13163,7 +13163,7 @@ public async Task Max_Double_WithNaN_Nullable_8_NoNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_8_NoNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_8_NoNull() { var input = new double?[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); @@ -13178,14 +13178,14 @@ public async Task Max_Selector_Double_WithNaN_Nullable_8_NoNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_8_NoNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_8_NoNull() { var input = new double?[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13194,14 +13194,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_8_NoNull() { var input = new double?[] { double.NaN, -19, double.NaN, -46, double.NaN, -63, double.NaN, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13210,7 +13210,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_No #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_8_AllNull() + public async Task MaxAsync_Double_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); @@ -13220,7 +13220,7 @@ public async Task Max_Double_WithNaN_Nullable_8_AllNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_8_AllNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); @@ -13230,29 +13230,29 @@ public async Task Max_Selector_Double_WithNaN_Nullable_8_AllNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_8_AllNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(double?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_8_AllNaN() + public async Task MaxAsync_Double_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); @@ -13262,7 +13262,7 @@ public async Task Max_Double_WithNaN_Nullable_8_AllNaN() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_8_AllNaN() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); @@ -13272,29 +13272,29 @@ public async Task Max_Selector_Double_WithNaN_Nullable_8_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_8_AllNaN() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_8_AllNaN() { var input = Enumerable.Repeat(double.NaN, 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_8_SomeNull() + public async Task MaxAsync_Double_WithNaN_Nullable_8_SomeNull() { var input = new double?[] { -48, null, double.NaN, -46, null, double.NaN, -10, null }.AsEnumerable(); @@ -13309,7 +13309,7 @@ public async Task Max_Double_WithNaN_Nullable_8_SomeNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_8_SomeNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_8_SomeNull() { var input = new double?[] { -48, null, double.NaN, -46, null, double.NaN, -10, null }.AsEnumerable(); @@ -13324,14 +13324,14 @@ public async Task Max_Selector_Double_WithNaN_Nullable_8_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_8_SomeNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_8_SomeNull() { var input = new double?[] { -48, null, double.NaN, -46, null, double.NaN, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13340,14 +13340,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_8_SomeNull() { var input = new double?[] { -48, null, double.NaN, -46, null, double.NaN, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13355,7 +13355,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_8_So } #endif [Fact] - public async Task Max_Double_WithNaN_16() + public async Task MaxAsync_Double_WithNaN_16() { var input = new double[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); @@ -13370,7 +13370,7 @@ public async Task Max_Double_WithNaN_16() } [Fact] - public async Task Max_Selector_Double_WithNaN_16() + public async Task MaxAsync_Selector_Double_WithNaN_16() { var input = new double[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); @@ -13385,14 +13385,14 @@ public async Task Max_Selector_Double_WithNaN_16() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_16() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_16() { var input = new double[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13401,14 +13401,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_16() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_16() { var input = new double[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13417,7 +13417,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_16() #endif [Fact] - public async Task Max_Double_WithNaN_16_AllNaN() + public async Task MaxAsync_Double_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); @@ -13427,7 +13427,7 @@ public async Task Max_Double_WithNaN_16_AllNaN() } [Fact] - public async Task Max_Selector_Double_WithNaN_16_AllNaN() + public async Task MaxAsync_Selector_Double_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); @@ -13437,29 +13437,29 @@ public async Task Max_Selector_Double_WithNaN_16_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_16_AllNaN() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_16_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_16_NoNull() + public async Task MaxAsync_Double_WithNaN_Nullable_16_NoNull() { var input = new double?[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); @@ -13474,7 +13474,7 @@ public async Task Max_Double_WithNaN_Nullable_16_NoNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_16_NoNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_16_NoNull() { var input = new double?[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); @@ -13489,14 +13489,14 @@ public async Task Max_Selector_Double_WithNaN_Nullable_16_NoNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_16_NoNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_16_NoNull() { var input = new double?[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13505,14 +13505,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_16_NoNull() { var input = new double?[] { double.NaN, 98, double.NaN, 98, double.NaN, 63, double.NaN, 14, double.NaN, -86, double.NaN, -79, double.NaN, -84, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13521,7 +13521,7 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_N #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_16_AllNull() + public async Task MaxAsync_Double_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); @@ -13531,7 +13531,7 @@ public async Task Max_Double_WithNaN_Nullable_16_AllNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_16_AllNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); @@ -13541,29 +13541,29 @@ public async Task Max_Selector_Double_WithNaN_Nullable_16_AllNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_16_AllNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(double?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_16_AllNaN() + public async Task MaxAsync_Double_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); @@ -13573,7 +13573,7 @@ public async Task Max_Double_WithNaN_Nullable_16_AllNaN() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_16_AllNaN() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); @@ -13583,29 +13583,29 @@ public async Task Max_Selector_Double_WithNaN_Nullable_16_AllNaN() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_16_AllNaN() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_AllNaN() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_16_AllNaN() { var input = Enumerable.Repeat(double.NaN, 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Double_WithNaN_Nullable_16_SomeNull() + public async Task MaxAsync_Double_WithNaN_Nullable_16_SomeNull() { var input = new double?[] { 59, null, double.NaN, 98, null, double.NaN, -100, null, double.NaN, -86, null, double.NaN, 19, null, double.NaN, 41 }.AsEnumerable(); @@ -13620,7 +13620,7 @@ public async Task Max_Double_WithNaN_Nullable_16_SomeNull() } [Fact] - public async Task Max_Selector_Double_WithNaN_Nullable_16_SomeNull() + public async Task MaxAsync_Selector_Double_WithNaN_Nullable_16_SomeNull() { var input = new double?[] { 59, null, double.NaN, 98, null, double.NaN, -100, null, double.NaN, -86, null, double.NaN, 19, null, double.NaN, 41 }.AsEnumerable(); @@ -13635,14 +13635,14 @@ public async Task Max_Selector_Double_WithNaN_Nullable_16_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Double_WithNaN_Nullable_16_SomeNull() + public async Task MaxAwaitAsync_Selector_Double_WithNaN_Nullable_16_SomeNull() { var input = new double?[] { 59, null, double.NaN, 98, null, double.NaN, -100, null, double.NaN, -86, null, double.NaN, 19, null, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13651,14 +13651,14 @@ public async Task Max_AsyncSelector_Double_WithNaN_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Double_WithNaN_Nullable_16_SomeNull() { var input = new double?[] { 59, null, double.NaN, 98, null, double.NaN, -100, null, double.NaN, -86, null, double.NaN, 19, null, double.NaN, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13666,59 +13666,59 @@ public async Task Max_AsyncSelectorWithCancellation_Double_WithNaN_Nullable_16_S } #endif [Fact] - public async Task Max_Empty_Decimal() + public async Task MaxAsync_Empty_Decimal() { await AssertThrowsAsync(new decimal[0].ToAsyncEnumerable().MaxAsync(CancellationToken.None).AsTask()); } [Fact] - public async Task Max_Selector_Empty_Decimal() + public async Task MaxAsync_Selector_Empty_Decimal() { await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync(_ => default(decimal), CancellationToken.None).AsTask()); } [Fact] - public async Task Max_AsyncSelector_Empty_Decimal() + public async Task MaxAwaitAsync_Selector_Empty_Decimal() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAwaitAsync(_ => default(ValueTask), CancellationToken.None).AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Empty_Decimal() + public async Task MaxAwaitWithCancellationAsync_Selector_Empty_Decimal() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None).AsTask()); } #endif [Fact] - public async Task Max_Empty_Nullable_Decimal() + public async Task MaxAsync_Empty_Nullable_Decimal() { Assert.Null(await new decimal?[0].ToAsyncEnumerable().MaxAsync(CancellationToken.None)); } [Fact] - public async Task Max_Selector_Empty_Nullable_Decimal() + public async Task MaxAsync_Selector_Empty_Nullable_Decimal() { Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync(_ => default(decimal?), CancellationToken.None)); } [Fact] - public async Task Max_AsyncSelector_Empty_Nullable_Decimal() + public async Task MaxAwaitAsync_Selector_Empty_Nullable_Decimal() { - Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync(_ => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MaxAwaitAsync(_ => default(ValueTask), CancellationToken.None)); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Empty_Nullable_Decimal() + public async Task MaxAwaitWithCancellationAsync_Selector_Empty_Nullable_Decimal() { - Assert.Null(await new object[0].ToAsyncEnumerable().MaxAsync((x, ct) => default(ValueTask), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => default(ValueTask), CancellationToken.None)); } #endif [Fact] - public async Task Max_Decimal_1() + public async Task MaxAsync_Decimal_1() { var input = new decimal[] { 33 }.AsEnumerable(); @@ -13733,7 +13733,7 @@ public async Task Max_Decimal_1() } [Fact] - public async Task Max_Selector_Decimal_1() + public async Task MaxAsync_Selector_Decimal_1() { var input = new decimal[] { 33 }.AsEnumerable(); @@ -13748,14 +13748,14 @@ public async Task Max_Selector_Decimal_1() } [Fact] - public async Task Max_AsyncSelector_Decimal_1() + public async Task MaxAwaitAsync_Selector_Decimal_1() { var input = new decimal[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13764,14 +13764,14 @@ public async Task Max_AsyncSelector_Decimal_1() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_1() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_1() { var input = new decimal[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13780,7 +13780,7 @@ public async Task Max_AsyncSelectorWithCancellation_Decimal_1() #endif [Fact] - public async Task Max_Decimal_Nullable_1_NoNull() + public async Task MaxAsync_Decimal_Nullable_1_NoNull() { var input = new decimal?[] { 33 }.AsEnumerable(); @@ -13795,7 +13795,7 @@ public async Task Max_Decimal_Nullable_1_NoNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_1_NoNull() + public async Task MaxAsync_Selector_Decimal_Nullable_1_NoNull() { var input = new decimal?[] { 33 }.AsEnumerable(); @@ -13810,14 +13810,14 @@ public async Task Max_Selector_Decimal_Nullable_1_NoNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_1_NoNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_1_NoNull() { var input = new decimal?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13826,14 +13826,14 @@ public async Task Max_AsyncSelector_Decimal_Nullable_1_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_1_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_1_NoNull() { var input = new decimal?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13842,7 +13842,7 @@ public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_1_NoNull() #endif [Fact] - public async Task Max_Decimal_Nullable_1_AllNull() + public async Task MaxAsync_Decimal_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(decimal?), 1); @@ -13852,7 +13852,7 @@ public async Task Max_Decimal_Nullable_1_AllNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_1_AllNull() + public async Task MaxAsync_Selector_Decimal_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(decimal?), 1); @@ -13862,29 +13862,29 @@ public async Task Max_Selector_Decimal_Nullable_1_AllNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_1_AllNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(decimal?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_1_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_1_AllNull() { var input = Enumerable.Repeat(default(decimal?), 1); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Decimal_Nullable_1_SomeNull() + public async Task MaxAsync_Decimal_Nullable_1_SomeNull() { var input = new decimal?[] { 33 }.AsEnumerable(); @@ -13899,7 +13899,7 @@ public async Task Max_Decimal_Nullable_1_SomeNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_1_SomeNull() + public async Task MaxAsync_Selector_Decimal_Nullable_1_SomeNull() { var input = new decimal?[] { 33 }.AsEnumerable(); @@ -13914,14 +13914,14 @@ public async Task Max_Selector_Decimal_Nullable_1_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_1_SomeNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_1_SomeNull() { var input = new decimal?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13930,14 +13930,14 @@ public async Task Max_AsyncSelector_Decimal_Nullable_1_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_1_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_1_SomeNull() { var input = new decimal?[] { 33 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13946,7 +13946,7 @@ public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_1_SomeNull( #endif [Fact] - public async Task Max_Decimal_4() + public async Task MaxAsync_Decimal_4() { var input = new decimal[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -13961,7 +13961,7 @@ public async Task Max_Decimal_4() } [Fact] - public async Task Max_Selector_Decimal_4() + public async Task MaxAsync_Selector_Decimal_4() { var input = new decimal[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -13976,14 +13976,14 @@ public async Task Max_Selector_Decimal_4() } [Fact] - public async Task Max_AsyncSelector_Decimal_4() + public async Task MaxAwaitAsync_Selector_Decimal_4() { var input = new decimal[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -13992,14 +13992,14 @@ public async Task Max_AsyncSelector_Decimal_4() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_4() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_4() { var input = new decimal[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14008,7 +14008,7 @@ public async Task Max_AsyncSelectorWithCancellation_Decimal_4() #endif [Fact] - public async Task Max_Decimal_Nullable_4_NoNull() + public async Task MaxAsync_Decimal_Nullable_4_NoNull() { var input = new decimal?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -14023,7 +14023,7 @@ public async Task Max_Decimal_Nullable_4_NoNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_4_NoNull() + public async Task MaxAsync_Selector_Decimal_Nullable_4_NoNull() { var input = new decimal?[] { -2, -78, -61, -17 }.AsEnumerable(); @@ -14038,14 +14038,14 @@ public async Task Max_Selector_Decimal_Nullable_4_NoNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_4_NoNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_4_NoNull() { var input = new decimal?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14054,14 +14054,14 @@ public async Task Max_AsyncSelector_Decimal_Nullable_4_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_4_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_4_NoNull() { var input = new decimal?[] { -2, -78, -61, -17 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14070,7 +14070,7 @@ public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_4_NoNull() #endif [Fact] - public async Task Max_Decimal_Nullable_4_AllNull() + public async Task MaxAsync_Decimal_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(decimal?), 4); @@ -14080,7 +14080,7 @@ public async Task Max_Decimal_Nullable_4_AllNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_4_AllNull() + public async Task MaxAsync_Selector_Decimal_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(decimal?), 4); @@ -14090,29 +14090,29 @@ public async Task Max_Selector_Decimal_Nullable_4_AllNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_4_AllNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(decimal?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_4_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_4_AllNull() { var input = Enumerable.Repeat(default(decimal?), 4); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Decimal_Nullable_4_SomeNull() + public async Task MaxAsync_Decimal_Nullable_4_SomeNull() { var input = new decimal?[] { -2, null, -61, null }.AsEnumerable(); @@ -14127,7 +14127,7 @@ public async Task Max_Decimal_Nullable_4_SomeNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_4_SomeNull() + public async Task MaxAsync_Selector_Decimal_Nullable_4_SomeNull() { var input = new decimal?[] { -2, null, -61, null }.AsEnumerable(); @@ -14142,14 +14142,14 @@ public async Task Max_Selector_Decimal_Nullable_4_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_4_SomeNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_4_SomeNull() { var input = new decimal?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14158,14 +14158,14 @@ public async Task Max_AsyncSelector_Decimal_Nullable_4_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_4_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_4_SomeNull() { var input = new decimal?[] { -2, null, -61, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14174,7 +14174,7 @@ public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_4_SomeNull( #endif [Fact] - public async Task Max_Decimal_8() + public async Task MaxAsync_Decimal_8() { var input = new decimal[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -14189,7 +14189,7 @@ public async Task Max_Decimal_8() } [Fact] - public async Task Max_Selector_Decimal_8() + public async Task MaxAsync_Selector_Decimal_8() { var input = new decimal[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -14204,14 +14204,14 @@ public async Task Max_Selector_Decimal_8() } [Fact] - public async Task Max_AsyncSelector_Decimal_8() + public async Task MaxAwaitAsync_Selector_Decimal_8() { var input = new decimal[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14220,14 +14220,14 @@ public async Task Max_AsyncSelector_Decimal_8() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_8() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_8() { var input = new decimal[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14236,7 +14236,7 @@ public async Task Max_AsyncSelectorWithCancellation_Decimal_8() #endif [Fact] - public async Task Max_Decimal_Nullable_8_NoNull() + public async Task MaxAsync_Decimal_Nullable_8_NoNull() { var input = new decimal?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -14251,7 +14251,7 @@ public async Task Max_Decimal_Nullable_8_NoNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_8_NoNull() + public async Task MaxAsync_Selector_Decimal_Nullable_8_NoNull() { var input = new decimal?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); @@ -14266,14 +14266,14 @@ public async Task Max_Selector_Decimal_Nullable_8_NoNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_8_NoNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_8_NoNull() { var input = new decimal?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14282,14 +14282,14 @@ public async Task Max_AsyncSelector_Decimal_Nullable_8_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_8_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_8_NoNull() { var input = new decimal?[] { -48, -19, 25, -46, 81, -63, -10, -99 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14298,7 +14298,7 @@ public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_8_NoNull() #endif [Fact] - public async Task Max_Decimal_Nullable_8_AllNull() + public async Task MaxAsync_Decimal_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(decimal?), 8); @@ -14308,7 +14308,7 @@ public async Task Max_Decimal_Nullable_8_AllNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_8_AllNull() + public async Task MaxAsync_Selector_Decimal_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(decimal?), 8); @@ -14318,29 +14318,29 @@ public async Task Max_Selector_Decimal_Nullable_8_AllNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_8_AllNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(decimal?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_8_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_8_AllNull() { var input = Enumerable.Repeat(default(decimal?), 8); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Decimal_Nullable_8_SomeNull() + public async Task MaxAsync_Decimal_Nullable_8_SomeNull() { var input = new decimal?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -14355,7 +14355,7 @@ public async Task Max_Decimal_Nullable_8_SomeNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_8_SomeNull() + public async Task MaxAsync_Selector_Decimal_Nullable_8_SomeNull() { var input = new decimal?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); @@ -14370,14 +14370,14 @@ public async Task Max_Selector_Decimal_Nullable_8_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_8_SomeNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_8_SomeNull() { var input = new decimal?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14386,14 +14386,14 @@ public async Task Max_AsyncSelector_Decimal_Nullable_8_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_8_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_8_SomeNull() { var input = new decimal?[] { -48, null, 25, null, 81, null, -10, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14402,7 +14402,7 @@ public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_8_SomeNull( #endif [Fact] - public async Task Max_Decimal_16() + public async Task MaxAsync_Decimal_16() { var input = new decimal[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -14417,7 +14417,7 @@ public async Task Max_Decimal_16() } [Fact] - public async Task Max_Selector_Decimal_16() + public async Task MaxAsync_Selector_Decimal_16() { var input = new decimal[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -14432,14 +14432,14 @@ public async Task Max_Selector_Decimal_16() } [Fact] - public async Task Max_AsyncSelector_Decimal_16() + public async Task MaxAwaitAsync_Selector_Decimal_16() { var input = new decimal[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14448,14 +14448,14 @@ public async Task Max_AsyncSelector_Decimal_16() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_16() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_16() { var input = new decimal[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14464,7 +14464,7 @@ public async Task Max_AsyncSelectorWithCancellation_Decimal_16() #endif [Fact] - public async Task Max_Decimal_Nullable_16_NoNull() + public async Task MaxAsync_Decimal_Nullable_16_NoNull() { var input = new decimal?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -14479,7 +14479,7 @@ public async Task Max_Decimal_Nullable_16_NoNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_16_NoNull() + public async Task MaxAsync_Selector_Decimal_Nullable_16_NoNull() { var input = new decimal?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); @@ -14494,14 +14494,14 @@ public async Task Max_Selector_Decimal_Nullable_16_NoNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_16_NoNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_16_NoNull() { var input = new decimal?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14510,14 +14510,14 @@ public async Task Max_AsyncSelector_Decimal_Nullable_16_NoNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_16_NoNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_16_NoNull() { var input = new decimal?[] { 59, 98, -3, 98, 20, 63, -100, 14, -77, -86, -26, -79, 19, -84, -28, 41 }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14526,7 +14526,7 @@ public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_16_NoNull() #endif [Fact] - public async Task Max_Decimal_Nullable_16_AllNull() + public async Task MaxAsync_Decimal_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(decimal?), 16); @@ -14536,7 +14536,7 @@ public async Task Max_Decimal_Nullable_16_AllNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_16_AllNull() + public async Task MaxAsync_Selector_Decimal_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(decimal?), 16); @@ -14546,29 +14546,29 @@ public async Task Max_Selector_Decimal_Nullable_16_AllNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_16_AllNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(decimal?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_16_AllNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_16_AllNull() { var input = Enumerable.Repeat(default(decimal?), 16); var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task Max_Decimal_Nullable_16_SomeNull() + public async Task MaxAsync_Decimal_Nullable_16_SomeNull() { var input = new decimal?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -14583,7 +14583,7 @@ public async Task Max_Decimal_Nullable_16_SomeNull() } [Fact] - public async Task Max_Selector_Decimal_Nullable_16_SomeNull() + public async Task MaxAsync_Selector_Decimal_Nullable_16_SomeNull() { var input = new decimal?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); @@ -14598,14 +14598,14 @@ public async Task Max_Selector_Decimal_Nullable_16_SomeNull() } [Fact] - public async Task Max_AsyncSelector_Decimal_Nullable_16_SomeNull() + public async Task MaxAwaitAsync_Selector_Decimal_Nullable_16_SomeNull() { var input = new decimal?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync(x => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitAsync(x => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -14614,14 +14614,14 @@ public async Task Max_AsyncSelector_Decimal_Nullable_16_SomeNull() #if !NO_DEEP_CANCELLATION [Fact] - public async Task Max_AsyncSelectorWithCancellation_Decimal_Nullable_16_SomeNull() + public async Task MaxAwaitWithCancellationAsync_Selector_Decimal_Nullable_16_SomeNull() { var input = new decimal?[] { 59, null, -3, null, 20, null, -100, null, -77, null, -26, null, 19, null, -28, null }.AsEnumerable(); for (var i = 0; i < 4; i++) { var expected = input.Max(); - var actual = await input.ToAsyncEnumerable().MaxAsync((x, ct) => new ValueTask(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().MaxAwaitWithCancellationAsync((x, ct) => new ValueTask(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/MinMax.Generated.tt b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/MinMax.Generated.tt index 9bc33cfd80..49ed2efd4e 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/MinMax.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/MinMax.Generated.tt @@ -54,54 +54,54 @@ foreach (var op in new[] { "Min", "Max" }) var cs = toCSharp(t); #> [Fact] - public async Task <#=op#>_Empty_<#=t.Name#>() + public async Task <#=op#>Async_Empty_<#=t.Name#>() { await AssertThrowsAsync(new <#=cs#>[0].ToAsyncEnumerable().<#=op#>Async(CancellationToken.None).AsTask()); } [Fact] - public async Task <#=op#>_Selector_Empty_<#=t.Name#>() + public async Task <#=op#>Async_Selector_Empty_<#=t.Name#>() { await AssertThrowsAsync(new object[0].ToAsyncEnumerable().<#=op#>Async(_ => default(<#=cs#>), CancellationToken.None).AsTask()); } [Fact] - public async Task <#=op#>_AsyncSelector_Empty_<#=t.Name#>() + public async Task <#=op#>AwaitAsync_Selector_Empty_<#=t.Name#>() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().<#=op#>Async(_ => default(ValueTask<<#=cs#>>), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().<#=op#>AwaitAsync(_ => default(ValueTask<<#=cs#>>), CancellationToken.None).AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_Empty_<#=t.Name#>() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_Empty_<#=t.Name#>() { - await AssertThrowsAsync(new object[0].ToAsyncEnumerable().<#=op#>Async((x, ct) => default(ValueTask<<#=cs#>>), CancellationToken.None).AsTask()); + await AssertThrowsAsync(new object[0].ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => default(ValueTask<<#=cs#>>), CancellationToken.None).AsTask()); } #endif [Fact] - public async Task <#=op#>_Empty_Nullable_<#=t.Name#>() + public async Task <#=op#>Async_Empty_Nullable_<#=t.Name#>() { Assert.Null(await new <#=cs#>?[0].ToAsyncEnumerable().<#=op#>Async(CancellationToken.None)); } [Fact] - public async Task <#=op#>_Selector_Empty_Nullable_<#=t.Name#>() + public async Task <#=op#>Async_Selector_Empty_Nullable_<#=t.Name#>() { Assert.Null(await new object[0].ToAsyncEnumerable().<#=op#>Async(_ => default(<#=cs#>?), CancellationToken.None)); } [Fact] - public async Task <#=op#>_AsyncSelector_Empty_Nullable_<#=t.Name#>() + public async Task <#=op#>AwaitAsync_Selector_Empty_Nullable_<#=t.Name#>() { - Assert.Null(await new object[0].ToAsyncEnumerable().<#=op#>Async(_ => default(ValueTask<<#=cs#>?>), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().<#=op#>AwaitAsync(_ => default(ValueTask<<#=cs#>?>), CancellationToken.None)); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_Empty_Nullable_<#=t.Name#>() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_Empty_Nullable_<#=t.Name#>() { - Assert.Null(await new object[0].ToAsyncEnumerable().<#=op#>Async((x, ct) => default(ValueTask<<#=cs#>?>), CancellationToken.None)); + Assert.Null(await new object[0].ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => default(ValueTask<<#=cs#>?>), CancellationToken.None)); } #endif @@ -112,7 +112,7 @@ foreach (var op in new[] { "Min", "Max" }) var valuesWithNull = string.Join(", ", getRandom(n * 42, n, -100, 100).Select((x, i) => i % 2 == 0 ? x.ToString() : "null")); #> [Fact] - public async Task <#=op#>_<#=t.Name#>_<#=n#>() + public async Task <#=op#>Async_<#=t.Name#>_<#=n#>() { var input = new <#=cs#>[] { <#=values#> }.AsEnumerable(); @@ -127,7 +127,7 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_Selector_<#=t.Name#>_<#=n#>() + public async Task <#=op#>Async_Selector_<#=t.Name#>_<#=n#>() { var input = new <#=cs#>[] { <#=values#> }.AsEnumerable(); @@ -142,14 +142,14 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_AsyncSelector_<#=t.Name#>_<#=n#>() + public async Task <#=op#>AwaitAsync_Selector_<#=t.Name#>_<#=n#>() { var input = new <#=cs#>[] { <#=values#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async(x => new ValueTask<<#=cs#>>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitAsync(x => new ValueTask<<#=cs#>>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -158,14 +158,14 @@ foreach (var op in new[] { "Min", "Max" }) #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_<#=t.Name#>_<#=n#>() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_<#=t.Name#>_<#=n#>() { var input = new <#=cs#>[] { <#=values#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async((x, ct) => new ValueTask<<#=cs#>>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -174,7 +174,7 @@ foreach (var op in new[] { "Min", "Max" }) #endif [Fact] - public async Task <#=op#>_<#=t.Name#>_Nullable_<#=n#>_NoNull() + public async Task <#=op#>Async_<#=t.Name#>_Nullable_<#=n#>_NoNull() { var input = new <#=cs#>?[] { <#=values#> }.AsEnumerable(); @@ -189,7 +189,7 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_Selector_<#=t.Name#>_Nullable_<#=n#>_NoNull() + public async Task <#=op#>Async_Selector_<#=t.Name#>_Nullable_<#=n#>_NoNull() { var input = new <#=cs#>?[] { <#=values#> }.AsEnumerable(); @@ -204,14 +204,14 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_AsyncSelector_<#=t.Name#>_Nullable_<#=n#>_NoNull() + public async Task <#=op#>AwaitAsync_Selector_<#=t.Name#>_Nullable_<#=n#>_NoNull() { var input = new <#=cs#>?[] { <#=values#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitAsync(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -220,14 +220,14 @@ foreach (var op in new[] { "Min", "Max" }) #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_<#=t.Name#>_Nullable_<#=n#>_NoNull() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_<#=t.Name#>_Nullable_<#=n#>_NoNull() { var input = new <#=cs#>?[] { <#=values#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -236,7 +236,7 @@ foreach (var op in new[] { "Min", "Max" }) #endif [Fact] - public async Task <#=op#>_<#=t.Name#>_Nullable_<#=n#>_AllNull() + public async Task <#=op#>Async_<#=t.Name#>_Nullable_<#=n#>_AllNull() { var input = Enumerable.Repeat(default(<#=cs#>?), <#=n#>); @@ -246,7 +246,7 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_Selector_<#=t.Name#>_Nullable_<#=n#>_AllNull() + public async Task <#=op#>Async_Selector_<#=t.Name#>_Nullable_<#=n#>_AllNull() { var input = Enumerable.Repeat(default(<#=cs#>?), <#=n#>); @@ -256,29 +256,29 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_AsyncSelector_<#=t.Name#>_Nullable_<#=n#>_AllNull() + public async Task <#=op#>AwaitAsync_Selector_<#=t.Name#>_Nullable_<#=n#>_AllNull() { var input = Enumerable.Repeat(default(<#=cs#>?), <#=n#>); var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitAsync(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_<#=t.Name#>_Nullable_<#=n#>_AllNull() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_<#=t.Name#>_Nullable_<#=n#>_AllNull() { var input = Enumerable.Repeat(default(<#=cs#>?), <#=n#>); var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task <#=op#>_<#=t.Name#>_Nullable_<#=n#>_SomeNull() + public async Task <#=op#>Async_<#=t.Name#>_Nullable_<#=n#>_SomeNull() { var input = new <#=cs#>?[] { <#=valuesWithNull#> }.AsEnumerable(); @@ -293,7 +293,7 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_Selector_<#=t.Name#>_Nullable_<#=n#>_SomeNull() + public async Task <#=op#>Async_Selector_<#=t.Name#>_Nullable_<#=n#>_SomeNull() { var input = new <#=cs#>?[] { <#=valuesWithNull#> }.AsEnumerable(); @@ -308,14 +308,14 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_AsyncSelector_<#=t.Name#>_Nullable_<#=n#>_SomeNull() + public async Task <#=op#>AwaitAsync_Selector_<#=t.Name#>_Nullable_<#=n#>_SomeNull() { var input = new <#=cs#>?[] { <#=valuesWithNull#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitAsync(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -324,14 +324,14 @@ foreach (var op in new[] { "Min", "Max" }) #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_<#=t.Name#>_Nullable_<#=n#>_SomeNull() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_<#=t.Name#>_Nullable_<#=n#>_SomeNull() { var input = new <#=cs#>?[] { <#=valuesWithNull#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -350,7 +350,7 @@ foreach (var op in new[] { "Min", "Max" }) var valuesWithNull = string.Join(", ", getRandom(n * 42, n, -100, 100).Select((x, i) => i % 3 == 0 ? x.ToString() : (i % 3 == 1 ? "null" : toCSharp(t) + ".NaN"))); #> [Fact] - public async Task <#=op#>_<#=t.Name#>_WithNaN_<#=n#>() + public async Task <#=op#>Async_<#=t.Name#>_WithNaN_<#=n#>() { var input = new <#=cs#>[] { <#=values#> }.AsEnumerable(); @@ -365,7 +365,7 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_Selector_<#=t.Name#>_WithNaN_<#=n#>() + public async Task <#=op#>Async_Selector_<#=t.Name#>_WithNaN_<#=n#>() { var input = new <#=cs#>[] { <#=values#> }.AsEnumerable(); @@ -380,14 +380,14 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_AsyncSelector_<#=t.Name#>_WithNaN_<#=n#>() + public async Task <#=op#>AwaitAsync_Selector_<#=t.Name#>_WithNaN_<#=n#>() { var input = new <#=cs#>[] { <#=values#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async(x => new ValueTask<<#=cs#>>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitAsync(x => new ValueTask<<#=cs#>>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -396,14 +396,14 @@ foreach (var op in new[] { "Min", "Max" }) #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_<#=t.Name#>_WithNaN_<#=n#>() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_<#=t.Name#>_WithNaN_<#=n#>() { var input = new <#=cs#>[] { <#=values#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async((x, ct) => new ValueTask<<#=cs#>>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -412,7 +412,7 @@ foreach (var op in new[] { "Min", "Max" }) #endif [Fact] - public async Task <#=op#>_<#=t.Name#>_WithNaN_<#=n#>_AllNaN() + public async Task <#=op#>Async_<#=t.Name#>_WithNaN_<#=n#>_AllNaN() { var input = Enumerable.Repeat(<#=toCSharp(t)#>.NaN, <#=n#>); @@ -422,7 +422,7 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_Selector_<#=t.Name#>_WithNaN_<#=n#>_AllNaN() + public async Task <#=op#>Async_Selector_<#=t.Name#>_WithNaN_<#=n#>_AllNaN() { var input = Enumerable.Repeat(<#=toCSharp(t)#>.NaN, <#=n#>); @@ -432,29 +432,29 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_AsyncSelector_<#=t.Name#>_WithNaN_<#=n#>_AllNaN() + public async Task <#=op#>AwaitAsync_Selector_<#=t.Name#>_WithNaN_<#=n#>_AllNaN() { var input = Enumerable.Repeat(<#=toCSharp(t)#>.NaN, <#=n#>); var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitAsync(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_<#=t.Name#>_WithNaN_<#=n#>_AllNaN() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_<#=t.Name#>_WithNaN_<#=n#>_AllNaN() { var input = Enumerable.Repeat(<#=toCSharp(t)#>.NaN, <#=n#>); var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task <#=op#>_<#=t.Name#>_WithNaN_Nullable_<#=n#>_NoNull() + public async Task <#=op#>Async_<#=t.Name#>_WithNaN_Nullable_<#=n#>_NoNull() { var input = new <#=cs#>?[] { <#=values#> }.AsEnumerable(); @@ -469,7 +469,7 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_NoNull() + public async Task <#=op#>Async_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_NoNull() { var input = new <#=cs#>?[] { <#=values#> }.AsEnumerable(); @@ -484,14 +484,14 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_AsyncSelector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_NoNull() + public async Task <#=op#>AwaitAsync_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_NoNull() { var input = new <#=cs#>?[] { <#=values#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitAsync(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -500,14 +500,14 @@ foreach (var op in new[] { "Min", "Max" }) #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_<#=t.Name#>_WithNaN_Nullable_<#=n#>_NoNull() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_NoNull() { var input = new <#=cs#>?[] { <#=values#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -516,7 +516,7 @@ foreach (var op in new[] { "Min", "Max" }) #endif [Fact] - public async Task <#=op#>_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNull() + public async Task <#=op#>Async_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNull() { var input = Enumerable.Repeat(default(<#=cs#>?), <#=n#>); @@ -526,7 +526,7 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNull() + public async Task <#=op#>Async_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNull() { var input = Enumerable.Repeat(default(<#=cs#>?), <#=n#>); @@ -536,29 +536,29 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_AsyncSelector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNull() + public async Task <#=op#>AwaitAsync_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNull() { var input = Enumerable.Repeat(default(<#=cs#>?), <#=n#>); var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitAsync(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNull() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNull() { var input = Enumerable.Repeat(default(<#=cs#>?), <#=n#>); var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task <#=op#>_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNaN() + public async Task <#=op#>Async_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNaN() { var input = Enumerable.Repeat<<#=toCSharp(t)#>?>(<#=toCSharp(t)#>.NaN, <#=n#>); @@ -568,7 +568,7 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNaN() + public async Task <#=op#>Async_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNaN() { var input = Enumerable.Repeat<<#=toCSharp(t)#>?>(<#=toCSharp(t)#>.NaN, <#=n#>); @@ -578,29 +578,29 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_AsyncSelector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNaN() + public async Task <#=op#>AwaitAsync_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNaN() { var input = Enumerable.Repeat<<#=toCSharp(t)#>?>(<#=toCSharp(t)#>.NaN, <#=n#>); var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitAsync(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNaN() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_AllNaN() { var input = Enumerable.Repeat<<#=toCSharp(t)#>?>(<#=toCSharp(t)#>.NaN, <#=n#>); var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); } #endif [Fact] - public async Task <#=op#>_<#=t.Name#>_WithNaN_Nullable_<#=n#>_SomeNull() + public async Task <#=op#>Async_<#=t.Name#>_WithNaN_Nullable_<#=n#>_SomeNull() { var input = new <#=cs#>?[] { <#=valuesWithNull#> }.AsEnumerable(); @@ -615,7 +615,7 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_SomeNull() + public async Task <#=op#>Async_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_SomeNull() { var input = new <#=cs#>?[] { <#=valuesWithNull#> }.AsEnumerable(); @@ -630,14 +630,14 @@ foreach (var op in new[] { "Min", "Max" }) } [Fact] - public async Task <#=op#>_AsyncSelector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_SomeNull() + public async Task <#=op#>AwaitAsync_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_SomeNull() { var input = new <#=cs#>?[] { <#=valuesWithNull#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitAsync(x => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); @@ -646,14 +646,14 @@ foreach (var op in new[] { "Min", "Max" }) #if !NO_DEEP_CANCELLATION [Fact] - public async Task <#=op#>_AsyncSelectorWithCancellation_<#=t.Name#>_WithNaN_Nullable_<#=n#>_SomeNull() + public async Task <#=op#>AwaitWithCancellationAsync_Selector_<#=t.Name#>_WithNaN_Nullable_<#=n#>_SomeNull() { var input = new <#=cs#>?[] { <#=valuesWithNull#> }.AsEnumerable(); for (var i = 0; i < <#=ShuffleCount#>; i++) { var expected = input.<#=op#>(); - var actual = await input.ToAsyncEnumerable().<#=op#>Async((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); + var actual = await input.ToAsyncEnumerable().<#=op#>AwaitWithCancellationAsync((x, ct) => new ValueTask<<#=cs#>?>(x), CancellationToken.None); Assert.Equal(expected, actual); input = Shuffle(input); diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.Generated.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.Generated.cs index 736a8fb09d..39d26a44f0 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.Generated.cs @@ -47,7 +47,7 @@ public async Task OrderBy_OrderByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)); var syncRes = xs.OrderBy(x => x % 2); await AssertSorted(asyncRes, syncRes); @@ -76,7 +76,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)); var syncRes = xs.OrderBy(x => x % 2); await AssertSorted(asyncRes, syncRes); @@ -134,7 +134,7 @@ public async Task OrderBy_OrderByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)); var syncRes = xs.OrderByDescending(x => x % 2); await AssertSorted(asyncRes, syncRes); @@ -163,7 +163,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)); var syncRes = xs.OrderByDescending(x => x % 2); await AssertSorted(asyncRes, syncRes); @@ -221,7 +221,7 @@ public async Task OrderBy_OrderBy_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -250,7 +250,7 @@ public async Task OrderBy_OrderBy_ThenByAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -308,7 +308,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -337,7 +337,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -366,7 +366,7 @@ public async Task OrderBy_OrderByAsync_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => x % 3); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -395,7 +395,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -424,7 +424,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -453,7 +453,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -482,7 +482,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -511,7 +511,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -540,7 +540,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -569,7 +569,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -598,7 +598,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsyncWithCancellati var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -627,7 +627,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -656,7 +656,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -685,7 +685,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -743,7 +743,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -772,7 +772,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -830,7 +830,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -859,7 +859,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsyncWithCancellatio var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -888,7 +888,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => x % 3); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -917,7 +917,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -946,7 +946,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -975,7 +975,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -1004,7 +1004,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -1033,7 +1033,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsyncWithCancel var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -1062,7 +1062,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -1091,7 +1091,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -1120,7 +1120,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -1149,7 +1149,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -1178,7 +1178,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -1207,7 +1207,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3); await AssertSorted(asyncRes, syncRes); @@ -1265,7 +1265,7 @@ public async Task OrderBy_OrderBy_ThenBy_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1294,7 +1294,7 @@ public async Task OrderBy_OrderBy_ThenBy_ThenByAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1352,7 +1352,7 @@ public async Task OrderBy_OrderBy_ThenBy_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1381,7 +1381,7 @@ public async Task OrderBy_OrderBy_ThenBy_ThenByDescendingAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1410,7 +1410,7 @@ public async Task OrderBy_OrderBy_ThenByAsync_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1439,7 +1439,7 @@ public async Task OrderBy_OrderBy_ThenByAsync_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1468,7 +1468,7 @@ public async Task OrderBy_OrderBy_ThenByAsync_ThenByAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1497,7 +1497,7 @@ public async Task OrderBy_OrderBy_ThenByAsync_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1526,7 +1526,7 @@ public async Task OrderBy_OrderBy_ThenByAsync_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1555,7 +1555,7 @@ public async Task OrderBy_OrderBy_ThenByAsync_ThenByDescendingAsyncWithCancellat var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1584,7 +1584,7 @@ public async Task OrderBy_OrderBy_ThenByAsyncWithCancellation_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1613,7 +1613,7 @@ public async Task OrderBy_OrderBy_ThenByAsyncWithCancellation_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1642,7 +1642,7 @@ public async Task OrderBy_OrderBy_ThenByAsyncWithCancellation_ThenByAsyncWithCan var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1671,7 +1671,7 @@ public async Task OrderBy_OrderBy_ThenByAsyncWithCancellation_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1700,7 +1700,7 @@ public async Task OrderBy_OrderBy_ThenByAsyncWithCancellation_ThenByDescendingAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1729,7 +1729,7 @@ public async Task OrderBy_OrderBy_ThenByAsyncWithCancellation_ThenByDescendingAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1787,7 +1787,7 @@ public async Task OrderBy_OrderBy_ThenByDescending_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1816,7 +1816,7 @@ public async Task OrderBy_OrderBy_ThenByDescending_ThenByAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1874,7 +1874,7 @@ public async Task OrderBy_OrderBy_ThenByDescending_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1903,7 +1903,7 @@ public async Task OrderBy_OrderBy_ThenByDescending_ThenByDescendingAsyncWithCanc var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1932,7 +1932,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsync_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1961,7 +1961,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsync_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -1990,7 +1990,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsync_ThenByAsyncWithCancellat var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2019,7 +2019,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsync_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2048,7 +2048,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsync_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2077,7 +2077,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsync_ThenByDescendingAsyncWit var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2106,7 +2106,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsyncWithCancellation_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2135,7 +2135,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsyncWithCancellation_ThenByAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2164,7 +2164,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsyncWithCancellation_ThenByAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2193,7 +2193,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsyncWithCancellation_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2222,7 +2222,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsyncWithCancellation_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2251,7 +2251,7 @@ public async Task OrderBy_OrderBy_ThenByDescendingAsyncWithCancellation_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2280,7 +2280,7 @@ public async Task OrderBy_OrderByAsync_ThenBy_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2309,7 +2309,7 @@ public async Task OrderBy_OrderByAsync_ThenBy_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2338,7 +2338,7 @@ public async Task OrderBy_OrderByAsync_ThenBy_ThenByAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2367,7 +2367,7 @@ public async Task OrderBy_OrderByAsync_ThenBy_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2396,7 +2396,7 @@ public async Task OrderBy_OrderByAsync_ThenBy_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2425,7 +2425,7 @@ public async Task OrderBy_OrderByAsync_ThenBy_ThenByDescendingAsyncWithCancellat var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2454,7 +2454,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsync_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2483,7 +2483,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsync_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2512,7 +2512,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsync_ThenByAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2541,7 +2541,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsync_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2570,7 +2570,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsync_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2599,7 +2599,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsync_ThenByDescendingAsyncWithCanc var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2628,7 +2628,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsyncWithCancellation_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2657,7 +2657,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsyncWithCancellation_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2686,7 +2686,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsyncWithCancellation_ThenByAsyncWi var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2715,7 +2715,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsyncWithCancellation_ThenByDescend var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2744,7 +2744,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsyncWithCancellation_ThenByDescend var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2773,7 +2773,7 @@ public async Task OrderBy_OrderByAsync_ThenByAsyncWithCancellation_ThenByDescend var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2802,7 +2802,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescending_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2831,7 +2831,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescending_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2860,7 +2860,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescending_ThenByAsyncWithCancellat var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2889,7 +2889,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescending_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2918,7 +2918,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescending_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2947,7 +2947,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescending_ThenByDescendingAsyncWit var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -2976,7 +2976,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsync_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3005,7 +3005,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsync_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3034,7 +3034,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsync_ThenByAsyncWithCanc var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3063,7 +3063,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsync_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3092,7 +3092,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsync_ThenByDescendingAsy var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3121,7 +3121,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsync_ThenByDescendingAsy var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3150,7 +3150,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3179,7 +3179,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3208,7 +3208,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3237,7 +3237,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3266,7 +3266,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3295,7 +3295,7 @@ public async Task OrderBy_OrderByAsync_ThenByDescendingAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3324,7 +3324,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenBy_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3353,7 +3353,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenBy_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3382,7 +3382,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenBy_ThenByAsyncWithCan var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3411,7 +3411,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenBy_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3440,7 +3440,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenBy_ThenByDescendingAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3469,7 +3469,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenBy_ThenByDescendingAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3498,7 +3498,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsync_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3527,7 +3527,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsync_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3556,7 +3556,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsync_ThenByAsyncWi var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3585,7 +3585,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsync_ThenByDescend var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3614,7 +3614,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsync_ThenByDescend var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3643,7 +3643,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsync_ThenByDescend var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3672,7 +3672,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsyncWithCancellati var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3701,7 +3701,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsyncWithCancellati var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3730,7 +3730,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsyncWithCancellati var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3759,7 +3759,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsyncWithCancellati var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3788,7 +3788,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsyncWithCancellati var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3817,7 +3817,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByAsyncWithCancellati var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3846,7 +3846,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescending_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3875,7 +3875,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescending_ThenByAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3904,7 +3904,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescending_ThenByAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3933,7 +3933,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescending_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3962,7 +3962,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescending_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -3991,7 +3991,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescending_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4020,7 +4020,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4049,7 +4049,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4078,7 +4078,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4107,7 +4107,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4136,7 +4136,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4165,7 +4165,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4194,7 +4194,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4223,7 +4223,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4252,7 +4252,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4281,7 +4281,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4310,7 +4310,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4339,7 +4339,7 @@ public async Task OrderBy_OrderByAsyncWithCancellation_ThenByDescendingAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderBy((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderBy(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4397,7 +4397,7 @@ public async Task OrderBy_OrderByDescending_ThenBy_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4426,7 +4426,7 @@ public async Task OrderBy_OrderByDescending_ThenBy_ThenByAsyncWithCancellation() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4484,7 +4484,7 @@ public async Task OrderBy_OrderByDescending_ThenBy_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4513,7 +4513,7 @@ public async Task OrderBy_OrderByDescending_ThenBy_ThenByDescendingAsyncWithCanc var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4542,7 +4542,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsync_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4571,7 +4571,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsync_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4600,7 +4600,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsync_ThenByAsyncWithCancellat var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4629,7 +4629,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsync_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4658,7 +4658,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsync_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4687,7 +4687,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsync_ThenByDescendingAsyncWit var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4716,7 +4716,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsyncWithCancellation_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4745,7 +4745,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsyncWithCancellation_ThenByAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4774,7 +4774,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsyncWithCancellation_ThenByAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4803,7 +4803,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsyncWithCancellation_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4832,7 +4832,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsyncWithCancellation_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4861,7 +4861,7 @@ public async Task OrderBy_OrderByDescending_ThenByAsyncWithCancellation_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4919,7 +4919,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescending_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -4948,7 +4948,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescending_ThenByAsyncWithCanc var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5006,7 +5006,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescending_ThenByDescendingAsy var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5035,7 +5035,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescending_ThenByDescendingAsy var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5064,7 +5064,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsync_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5093,7 +5093,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsync_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5122,7 +5122,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsync_ThenByAsyncWit var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5151,7 +5151,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsync_ThenByDescendi var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5180,7 +5180,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsync_ThenByDescendi var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5209,7 +5209,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsync_ThenByDescendi var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5238,7 +5238,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsyncWithCancellatio var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5267,7 +5267,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsyncWithCancellatio var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5296,7 +5296,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsyncWithCancellatio var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5325,7 +5325,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsyncWithCancellatio var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5354,7 +5354,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsyncWithCancellatio var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5383,7 +5383,7 @@ public async Task OrderBy_OrderByDescending_ThenByDescendingAsyncWithCancellatio var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => x % 2).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5412,7 +5412,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenBy_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5441,7 +5441,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenBy_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5470,7 +5470,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenBy_ThenByAsyncWithCancellat var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5499,7 +5499,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenBy_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5528,7 +5528,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenBy_ThenByDescendingAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5557,7 +5557,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenBy_ThenByDescendingAsyncWit var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5586,7 +5586,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsync_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5615,7 +5615,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsync_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5644,7 +5644,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsync_ThenByAsyncWithCanc var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5673,7 +5673,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsync_ThenByDescending() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5702,7 +5702,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsync_ThenByDescendingAsy var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5731,7 +5731,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsync_ThenByDescendingAsy var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5760,7 +5760,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5789,7 +5789,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5818,7 +5818,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5847,7 +5847,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5876,7 +5876,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5905,7 +5905,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByAsyncWithCancellation_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5934,7 +5934,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescending_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5963,7 +5963,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescending_ThenByAsync() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -5992,7 +5992,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescending_ThenByAsyncWit var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6021,7 +6021,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescending_ThenByDescendi var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6050,7 +6050,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescending_ThenByDescendi var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6079,7 +6079,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescending_ThenByDescendi var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6108,7 +6108,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsync_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6137,7 +6137,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsync_ThenByAsy var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6166,7 +6166,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsync_ThenByAsy var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6195,7 +6195,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsync_ThenByDes var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6224,7 +6224,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsync_ThenByDes var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6253,7 +6253,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsync_ThenByDes var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6282,7 +6282,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsyncWithCancel var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6311,7 +6311,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsyncWithCancel var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6340,7 +6340,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsyncWithCancel var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6369,7 +6369,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsyncWithCancel var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6398,7 +6398,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsyncWithCancel var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6427,7 +6427,7 @@ public async Task OrderBy_OrderByDescendingAsync_ThenByDescendingAsyncWithCancel var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending(x => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwait(x => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6456,7 +6456,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenBy_ThenBy() var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6485,7 +6485,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenBy_ThenByAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6514,7 +6514,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenBy_ThenByAs var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6543,7 +6543,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenBy_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6572,7 +6572,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenBy_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6601,7 +6601,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenBy_ThenByDe var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenBy(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6630,7 +6630,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6659,7 +6659,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6688,7 +6688,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6717,7 +6717,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6746,7 +6746,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6775,7 +6775,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsync_The var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6804,7 +6804,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6833,7 +6833,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6862,7 +6862,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6891,7 +6891,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6920,7 +6920,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6949,7 +6949,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByAsyncWith var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenBy((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenBy(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -6978,7 +6978,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7007,7 +7007,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7036,7 +7036,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7065,7 +7065,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7094,7 +7094,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7123,7 +7123,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => x % 3).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7152,7 +7152,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7181,7 +7181,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7210,7 +7210,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7239,7 +7239,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7268,7 +7268,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7297,7 +7297,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending(x => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwait(x => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7326,7 +7326,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenBy(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7355,7 +7355,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7384,7 +7384,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenBy((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenBy(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7413,7 +7413,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => x % 4); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7442,7 +7442,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending(x => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwait(x => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); @@ -7471,7 +7471,7 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin var rand = new Random(42); var xs = Enumerable.Range(0, 100).Select(x => rand.Next(0, 100)).ToArray().Select(x => x); - var asyncRes = xs.ToAsyncEnumerable().OrderByDescending((x, ct) => new ValueTask(x % 2)).ThenByDescending((x, ct) => new ValueTask(x % 3)).ThenByDescending((x, ct) => new ValueTask(x % 4)); + var asyncRes = xs.ToAsyncEnumerable().OrderByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 2)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 3)).ThenByDescendingAwaitWithCancellation((x, ct) => new ValueTask(x % 4)); var syncRes = xs.OrderByDescending(x => x % 2).ThenByDescending(x => x % 3).ThenByDescending(x => x % 4); await AssertSorted(asyncRes, syncRes); diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.Generated.tt b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.Generated.tt index ec37fc84eb..189fee594a 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.Generated.tt @@ -15,6 +15,16 @@ Func getAsyncMethod = (then, desc, async var arg = async ? (cancel ? "(x, ct) => " : "x => ") + "new ValueTask(" + body + ")" : "x => " + body; + if (async) + { + mtd += "Await"; + + if (cancel) + { + mtd += "WithCancellation"; + } + } + return "." + mtd + "(" + arg + ")"; }; diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.cs index f84f63edd2..80ee6b3147 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/OrderBy.cs @@ -19,13 +19,13 @@ public void OrderBy_Null() Assert.Throws(() => AsyncEnumerable.OrderBy(Return42, default(Func))); Assert.Throws(() => AsyncEnumerable.OrderBy(default, x => x, Comparer.Default)); - Assert.Throws(() => AsyncEnumerable.OrderBy(Return42, default(Func), Comparer.Default)); + Assert.Throws(() => AsyncEnumerable.OrderBy(Return42, default, Comparer.Default)); Assert.Throws(() => AsyncEnumerable.OrderByDescending(default, x => x)); Assert.Throws(() => AsyncEnumerable.OrderByDescending(Return42, default(Func))); Assert.Throws(() => AsyncEnumerable.OrderByDescending(default, x => x, Comparer.Default)); - Assert.Throws(() => AsyncEnumerable.OrderByDescending(Return42, default(Func), Comparer.Default)); + Assert.Throws(() => AsyncEnumerable.OrderByDescending(Return42, default, Comparer.Default)); var xs = Return42.OrderBy(x => x); @@ -33,13 +33,13 @@ public void OrderBy_Null() Assert.Throws(() => AsyncEnumerable.ThenBy(xs, default(Func))); Assert.Throws(() => AsyncEnumerable.ThenBy(default, x => x, Comparer.Default)); - Assert.Throws(() => AsyncEnumerable.ThenBy(xs, default(Func), Comparer.Default)); + Assert.Throws(() => AsyncEnumerable.ThenBy(xs, default, Comparer.Default)); Assert.Throws(() => AsyncEnumerable.ThenByDescending(default, x => x)); Assert.Throws(() => AsyncEnumerable.ThenByDescending(xs, default(Func))); Assert.Throws(() => AsyncEnumerable.ThenByDescending(default, x => x, Comparer.Default)); - Assert.Throws(() => AsyncEnumerable.ThenByDescending(xs, default(Func), Comparer.Default)); + Assert.Throws(() => AsyncEnumerable.ThenByDescending(xs, default, Comparer.Default)); } [Fact] diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Select.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Select.cs index ec6ecf89bb..146ef04604 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Select.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Select.cs @@ -188,7 +188,7 @@ public async Task Select_Sync_SelectSelect_IList() } [Fact] - public async Task Select_Sync_SelectSelect_AsyncIterator() + public async Task Select_Sync_SelectSelectAwaitIterator() { var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable(); var ys = xs.Select(i => i + 3).Select(x => (char)('a' + x)); @@ -282,19 +282,19 @@ public async Task Select_Sync_IList_ToArray() } [Fact] - public void Select_Async_Null() + public void SelectAwait_Null() { - Assert.Throws(() => AsyncEnumerable.Select(default, x => new ValueTask(x))); - Assert.Throws(() => AsyncEnumerable.Select(default, (int x, int i) => new ValueTask(x))); - Assert.Throws(() => AsyncEnumerable.Select(Return42, default(Func>))); - Assert.Throws(() => AsyncEnumerable.Select(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.SelectAwait(default, x => new ValueTask(x))); + Assert.Throws(() => AsyncEnumerable.SelectAwait(default, (int x, int i) => new ValueTask(x))); + Assert.Throws(() => AsyncEnumerable.SelectAwait(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.SelectAwait(Return42, default(Func>))); } [Fact] - public async Task Select_Async_Simple() + public async Task SelectAwait_Simple() { var xs = ToAsyncEnumerable(new[] { 0, 1, 2 }); - var ys = xs.Select(x => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwait(x => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -304,10 +304,10 @@ public async Task Select_Async_Simple() } [Fact] - public async Task Select_Async_Simple_IList() + public async Task SelectAwait_Simple_IList() { var xs = ToAsyncEnumerableIList(new[] { 0, 1, 2 }); - var ys = xs.Select(x => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwait(x => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -317,10 +317,10 @@ public async Task Select_Async_Simple_IList() } [Fact] - public async Task Select_Async_Simple_AsyncIterator() + public async Task SelectAwait_Simple_AsyncIterator() { var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable(); - var ys = xs.Select(x => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwait(x => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -330,10 +330,10 @@ public async Task Select_Async_Simple_AsyncIterator() } [Fact] - public async Task Select_Async_Indexed() + public async Task SelectAwait_Indexed() { var xs = ToAsyncEnumerable(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwait((x, i) => new ValueTask((char)('a' + i))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -343,10 +343,10 @@ public async Task Select_Async_Indexed() } [Fact] - public async Task Select_Async_Indexed_IList() + public async Task SelectAwait_Indexed_IList() { var xs = ToAsyncEnumerableIList(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwait((x, i) => new ValueTask((char)('a' + i))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -356,10 +356,10 @@ public async Task Select_Async_Indexed_IList() } [Fact] - public async Task Select_Async_Indexed_AsyncIterator() + public async Task SelectAwait_Indexed_AsyncIterator() { var xs = new[] { 8, 5, 7 }.ToAsyncEnumerable(); - var ys = xs.Select((x, i) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwait((x, i) => new ValueTask((char)('a' + i))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -369,70 +369,70 @@ public async Task Select_Async_Indexed_AsyncIterator() } [Fact] - public async Task Select_Async_Throws_Selector() + public async Task SelectAwait_Throws_Selector() { var xs = ToAsyncEnumerable(new[] { 0, 1, 2 }); - var ys = xs.Select(x => new ValueTask(1 / x)); + var ys = xs.SelectAwait(x => new ValueTask(1 / x)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_Throws_Selector_IList() + public async Task SelectAwait_Throws_Selector_IList() { var xs = ToAsyncEnumerableIList(new[] { 0, 1, 2 }); - var ys = xs.Select(x => new ValueTask(1 / x)); + var ys = xs.SelectAwait(x => new ValueTask(1 / x)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_Throws_Selector_AsyncIterator() + public async Task SelectAwait_Throws_Selector_AsyncIterator() { var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable(); - var ys = xs.Select(x => new ValueTask(1 / x)); + var ys = xs.SelectAwait(x => new ValueTask(1 / x)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_Indexed_Throws_Selector() + public async Task SelectAwait_Indexed_Throws_Selector() { var xs = ToAsyncEnumerable(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i) => new ValueTask(1 / i)); + var ys = xs.SelectAwait((x, i) => new ValueTask(1 / i)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_Indexed_Throws_Selector_IList() + public async Task SelectAwait_Indexed_Throws_Selector_IList() { var xs = ToAsyncEnumerableIList(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i) => new ValueTask(1 / i)); + var ys = xs.SelectAwait((x, i) => new ValueTask(1 / i)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_Indexed_Throws_Selector_AsyncIterator() + public async Task SelectAwait_Indexed_Throws_Selector_AsyncIterator() { var xs = new[] { 8, 5, 7 }.ToAsyncEnumerable(); - var ys = xs.Select((x, i) => new ValueTask(1 / i)); + var ys = xs.SelectAwait((x, i) => new ValueTask(1 / i)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_SelectSelect() + public async Task SelectAwait_SelectSelect() { var xs = ToAsyncEnumerable(new[] { 0, 1, 2 }); - var ys = xs.Select(i => new ValueTask(i + 3)).Select(x => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwait(i => new ValueTask(i + 3)).SelectAwait(x => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'd'); @@ -442,10 +442,10 @@ public async Task Select_Async_SelectSelect() } [Fact] - public async Task Select_Async_SelectSelect_IList() + public async Task SelectAwait_SelectSelect_IList() { var xs = ToAsyncEnumerableIList(new[] { 0, 1, 2 }); - var ys = xs.Select(i => new ValueTask(i + 3)).Select(x => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwait(i => new ValueTask(i + 3)).SelectAwait(x => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'd'); @@ -455,10 +455,10 @@ public async Task Select_Async_SelectSelect_IList() } [Fact] - public async Task Select_Async_SelectSelect_AsyncIterator() + public async Task SelectAwait_SelectSelectAwaitIterator() { var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable(); - var ys = xs.Select(i => new ValueTask(i + 3)).Select(x => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwait(i => new ValueTask(i + 3)).SelectAwait(x => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'd'); @@ -468,104 +468,102 @@ public async Task Select_Async_SelectSelect_AsyncIterator() } [Fact] - public async Task Select_Async_SequenceIdentity() + public async Task SelectAwait_SequenceIdentity() { var xs = ToAsyncEnumerable(new[] { 1, 2, 3 }); - var ys = xs.Select(x => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwait(x => new ValueTask((char)('a' + x))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_SequenceIdentity_IList() + public async Task SelectAwait_SequenceIdentity_IList() { var xs = ToAsyncEnumerableIList(new[] { 1, 2, 3 }); - var ys = xs.Select(x => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwait(x => new ValueTask((char)('a' + x))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_SequenceIdentity_AsyncIterator() + public async Task SelectAwait_SequenceIdentity_AsyncIterator() { var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable(); - var ys = xs.Select(x => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwait(x => new ValueTask((char)('a' + x))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_Indexed_SequenceIdentity() + public async Task SelectAwait_Indexed_SequenceIdentity() { var xs = ToAsyncEnumerable(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwait((x, i) => new ValueTask((char)('a' + i))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_Indexed_SequenceIdentity_IList() + public async Task SelectAwait_Indexed_SequenceIdentity_IList() { var xs = ToAsyncEnumerableIList(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwait((x, i) => new ValueTask((char)('a' + i))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_Indexed_SequenceIdentity_AsyncIterator() + public async Task SelectAwait_Indexed_SequenceIdentity_AsyncIterator() { var xs = new[] { 8, 5, 7 }.ToAsyncEnumerable(); - var ys = xs.Select((x, i) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwait((x, i) => new ValueTask((char)('a' + i))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_IList_Count() + public async Task SelectAwait_IList_Count() { var xs = ToAsyncEnumerableIList(new[] { 1, 2, 3, 4, 5 }); - var ys = xs.Select(x => new ValueTask(x * 2)); + var ys = xs.SelectAwait(x => new ValueTask(x * 2)); Assert.Equal(5, await ys.CountAsync()); } [Fact] - public async Task Select_Async_IList_ToList() + public async Task SelectAwait_IList_ToList() { var xs = ToAsyncEnumerableIList(new[] { 1, 2, 3, 4, 5 }); - var ys = xs.Select(x => new ValueTask(x * 2)); + var ys = xs.SelectAwait(x => new ValueTask(x * 2)); Assert.Equal(new[] { 2, 4, 6, 8, 10 }, await ys.ToListAsync()); } [Fact] - public async Task Select_Async_IList_ToArray() + public async Task SelectAwait_IList_ToArray() { var xs = ToAsyncEnumerableIList(new[] { 1, 2, 3, 4, 5 }); - var ys = xs.Select(x => new ValueTask(x * 2)); + var ys = xs.SelectAwait(x => new ValueTask(x * 2)); Assert.Equal(new[] { 2, 4, 6, 8, 10 }, await ys.ToArrayAsync()); } #if !NO_DEEP_CANCELLATION - // REVIEW: These overloads are problematic for type inference. E.g. xs.Select((x, ct) => ...) is ambiguous. - [Fact] - public void Select_Async_Cancel_Null() + public void SelectAwaitWithCancellation_Null() { - Assert.Throws(() => AsyncEnumerable.Select(default, (int x, CancellationToken ct) => new ValueTask(x))); - Assert.Throws(() => AsyncEnumerable.Select(default, (int x, int i, CancellationToken ct) => new ValueTask(x))); - Assert.Throws(() => AsyncEnumerable.Select(Return42, default(Func>))); - Assert.Throws(() => AsyncEnumerable.Select(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.SelectAwaitWithCancellation(default, (int x, CancellationToken ct) => new ValueTask(x))); + Assert.Throws(() => AsyncEnumerable.SelectAwaitWithCancellation(default, (int x, int i, CancellationToken ct) => new ValueTask(x))); + Assert.Throws(() => AsyncEnumerable.SelectAwaitWithCancellation(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.SelectAwaitWithCancellation(Return42, default(Func>))); } [Fact] - public async Task Select_Async_Cancel_Simple() + public async Task SelectAwaitWithCancellation_Simple() { var xs = ToAsyncEnumerable(new[] { 0, 1, 2 }); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -575,10 +573,10 @@ public async Task Select_Async_Cancel_Simple() } [Fact] - public async Task Select_Async_Cancel_Simple_IList() + public async Task SelectAwaitWithCancellation_Simple_IList() { var xs = ToAsyncEnumerableIList(new[] { 0, 1, 2 }); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -588,10 +586,10 @@ public async Task Select_Async_Cancel_Simple_IList() } [Fact] - public async Task Select_Async_Cancel_Simple_Async_CancelIterator() + public async Task SelectAwaitWithCancellation_Simple_Async_CancelIterator() { var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable(); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -601,10 +599,10 @@ public async Task Select_Async_Cancel_Simple_Async_CancelIterator() } [Fact] - public async Task Select_Async_Cancel_Indexed() + public async Task SelectAwaitWithCancellation_Indexed() { var xs = ToAsyncEnumerable(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i, ct) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwaitWithCancellation((x, i, ct) => new ValueTask((char)('a' + i))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -614,10 +612,10 @@ public async Task Select_Async_Cancel_Indexed() } [Fact] - public async Task Select_Async_Cancel_Indexed_IList() + public async Task SelectAwaitWithCancellation_Indexed_IList() { var xs = ToAsyncEnumerableIList(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i, ct) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwaitWithCancellation((x, i, ct) => new ValueTask((char)('a' + i))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -627,10 +625,10 @@ public async Task Select_Async_Cancel_Indexed_IList() } [Fact] - public async Task Select_Async_Cancel_Indexed_Async_CancelIterator() + public async Task SelectAwaitWithCancellation_Indexed_Async_CancelIterator() { var xs = new[] { 8, 5, 7 }.ToAsyncEnumerable(); - var ys = xs.Select((x, i, ct) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwaitWithCancellation((x, i, ct) => new ValueTask((char)('a' + i))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'a'); @@ -640,70 +638,70 @@ public async Task Select_Async_Cancel_Indexed_Async_CancelIterator() } [Fact] - public async Task Select_Async_Cancel_Throws_Selector() + public async Task SelectAwaitWithCancellation_Throws_Selector() { var xs = ToAsyncEnumerable(new[] { 0, 1, 2 }); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask(1 / x)); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(1 / x)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_Cancel_Throws_Selector_IList() + public async Task SelectAwaitWithCancellation_Throws_Selector_IList() { var xs = ToAsyncEnumerableIList(new[] { 0, 1, 2 }); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask(1 / x)); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(1 / x)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_Cancel_Throws_Selector_Async_CancelIterator() + public async Task SelectAwaitWithCancellation_Throws_Selector_Async_CancelIterator() { var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable(); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask(1 / x)); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(1 / x)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_Cancel_Indexed_Throws_Selector() + public async Task SelectAwaitWithCancellation_Indexed_Throws_Selector() { var xs = ToAsyncEnumerable(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i, ct) => new ValueTask(1 / i)); + var ys = xs.SelectAwaitWithCancellation((x, i, ct) => new ValueTask(1 / i)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_Cancel_Indexed_Throws_Selector_IList() + public async Task SelectAwaitWithCancellation_Indexed_Throws_Selector_IList() { var xs = ToAsyncEnumerableIList(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i, ct) => new ValueTask(1 / i)); + var ys = xs.SelectAwaitWithCancellation((x, i, ct) => new ValueTask(1 / i)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_Cancel_Indexed_Throws_Selector_Async_CancelIterator() + public async Task SelectAwaitWithCancellation_Indexed_Throws_Selector_Async_CancelIterator() { var xs = new[] { 8, 5, 7 }.ToAsyncEnumerable(); - var ys = xs.Select((x, i, ct) => new ValueTask(1 / i)); + var ys = xs.SelectAwaitWithCancellation((x, i, ct) => new ValueTask(1 / i)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync().AsTask()); } [Fact] - public async Task Select_Async_Cancel_SelectSelect() + public async Task SelectAwaitWithCancellation_SelectSelect() { var xs = ToAsyncEnumerable(new[] { 0, 1, 2 }); - var ys = xs.Select((int i, CancellationToken ct) => new ValueTask(i + 3)).Select((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwaitWithCancellation((int i, CancellationToken ct) => new ValueTask(i + 3)).SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'd'); @@ -713,10 +711,10 @@ public async Task Select_Async_Cancel_SelectSelect() } [Fact] - public async Task Select_Async_Cancel_SelectSelect_IList() + public async Task SelectAwaitWithCancellation_SelectSelect_IList() { var xs = ToAsyncEnumerableIList(new[] { 0, 1, 2 }); - var ys = xs.Select((int i, CancellationToken ct) => new ValueTask(i + 3)).Select((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwaitWithCancellation((int i, CancellationToken ct) => new ValueTask(i + 3)).SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'd'); @@ -726,10 +724,10 @@ public async Task Select_Async_Cancel_SelectSelect_IList() } [Fact] - public async Task Select_Async_Cancel_SelectSelect_Async_CancelIterator() + public async Task SelectAwaitWithCancellation_SelectSelectAwait_CancelIterator() { var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable(); - var ys = xs.Select((int i, CancellationToken ct) => new ValueTask(i + 3)).Select((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwaitWithCancellation((int i, CancellationToken ct) => new ValueTask(i + 3)).SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 'd'); @@ -739,82 +737,82 @@ public async Task Select_Async_Cancel_SelectSelect_Async_CancelIterator() } [Fact] - public async Task Select_Async_Cancel_SequenceIdentity() + public async Task SelectAwaitWithCancellation_SequenceIdentity() { var xs = ToAsyncEnumerable(new[] { 1, 2, 3 }); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_Cancel_SequenceIdentity_IList() + public async Task SelectAwaitWithCancellation_SequenceIdentity_IList() { var xs = ToAsyncEnumerableIList(new[] { 1, 2, 3 }); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_Cancel_SequenceIdentity_Async_CancelIterator() + public async Task SelectAwaitWithCancellation_SequenceIdentity_Async_CancelIterator() { var xs = new[] { 0, 1, 2 }.ToAsyncEnumerable(); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask((char)('a' + x))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_Cancel_Indexed_SequenceIdentity() + public async Task SelectAwaitWithCancellation_Indexed_SequenceIdentity() { var xs = ToAsyncEnumerable(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i, ct) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwaitWithCancellation((x, i, ct) => new ValueTask((char)('a' + i))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_Cancel_Indexed_SequenceIdentity_IList() + public async Task SelectAwaitWithCancellation_Indexed_SequenceIdentity_IList() { var xs = ToAsyncEnumerableIList(new[] { 8, 5, 7 }); - var ys = xs.Select((x, i, ct) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwaitWithCancellation((x, i, ct) => new ValueTask((char)('a' + i))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_Cancel_Indexed_SequenceIdentity_Async_CancelIterator() + public async Task SelectAwaitWithCancellation_Indexed_SequenceIdentity_Async_CancelIterator() { var xs = new[] { 8, 5, 7 }.ToAsyncEnumerable(); - var ys = xs.Select((x, i, ct) => new ValueTask((char)('a' + i))); + var ys = xs.SelectAwaitWithCancellation((x, i, ct) => new ValueTask((char)('a' + i))); await SequenceIdentity(ys); } [Fact] - public async Task Select_Async_Cancel_IList_Count() + public async Task SelectAwaitWithCancellation_IList_Count() { var xs = ToAsyncEnumerableIList(new[] { 1, 2, 3, 4, 5 }); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask(x * 2)); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x * 2)); Assert.Equal(5, await ys.CountAsync()); } [Fact] - public async Task Select_Async_Cancel_IList_ToList() + public async Task SelectAwaitWithCancellation_IList_ToList() { var xs = ToAsyncEnumerableIList(new[] { 1, 2, 3, 4, 5 }); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask(x * 2)); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x * 2)); Assert.Equal(new[] { 2, 4, 6, 8, 10 }, await ys.ToListAsync()); } [Fact] - public async Task Select_Async_Cancel_IList_ToArray() + public async Task SelectAwaitWithCancellation_IList_ToArray() { var xs = ToAsyncEnumerableIList(new[] { 1, 2, 3, 4, 5 }); - var ys = xs.Select((int x, CancellationToken ct) => new ValueTask(x * 2)); + var ys = xs.SelectAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x * 2)); Assert.Equal(new[] { 2, 4, 6, 8, 10 }, await ys.ToArrayAsync()); } diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Single.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Single.cs index 8a4db6a857..b23398541a 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Single.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Single.cs @@ -76,7 +76,7 @@ public async Task SingleAsync_Predicate_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAsync(Return42, default(Func)).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAsync(default, x => true, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAsync(Return42, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] @@ -123,106 +123,106 @@ public async Task SingleAsync_Predicate_Throw_MoreThanOne() } [Fact] - public async Task SingleAsync_AsyncPredicate_Null() + public async Task SingleAwaitAsync_Predicate_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAsync(default, x => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAwaitAsync(default, x => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAwaitAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAwaitAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAwaitAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task SingleAsync_AsyncPredicate_Empty() + public async Task SingleAwaitAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().SingleAsync(x => new ValueTask(true)); + var res = AsyncEnumerable.Empty().SingleAwaitAsync(x => new ValueTask(true)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task SingleAsync_AsyncPredicate_NoMatch() + public async Task SingleAwaitAsync_Predicate_NoMatch() { - var res = Return42.SingleAsync(x => new ValueTask(x % 2 != 0)); + var res = Return42.SingleAwaitAsync(x => new ValueTask(x % 2 != 0)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task SingleAsync_AsyncPredicate_Simple() + public async Task SingleAwaitAsync_Predicate_Simple() { - var res = Return42.SingleAsync(x => new ValueTask(x % 2 == 0)); + var res = Return42.SingleAwaitAsync(x => new ValueTask(x % 2 == 0)); Assert.Equal(42, await res); } [Fact] - public async Task SingleAsync_AsyncPredicate_Throws() + public async Task SingleAwaitAsync_Predicate_Throws() { var ex = new Exception("Bang!"); - var res = Throw(ex).SingleAsync(x => new ValueTask(true)); + var res = Throw(ex).SingleAwaitAsync(x => new ValueTask(true)); await AssertThrowsAsync(res, ex); } [Fact] - public async Task SingleAsync_AsyncPredicate_OneMatch() + public async Task SingleAwaitAsync_Predicate_OneMatch() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task SingleAsync_AsyncPredicate_Throw_MoreThanOne() + public async Task SingleAwaitAsync_Predicate_Throw_MoreThanOne() { - var res = new[] { 42, 23, 45, 90 }.ToAsyncEnumerable().SingleAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 23, 45, 90 }.ToAsyncEnumerable().SingleAwaitAsync(x => new ValueTask(x % 2 != 0)); await AssertThrowsAsync(res.AsTask()); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task SingleAsync_AsyncPredicate_Cancel_Null() + public async Task SingleAwaitWithCancellationAsync_Predicate_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleAwaitWithCancellationAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task SingleAsync_AsyncPredicate_Cancel_Empty() + public async Task SingleAwaitWithCancellationAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().SingleAsync((x, ct) => new ValueTask(true)); + var res = AsyncEnumerable.Empty().SingleAwaitWithCancellationAsync((x, ct) => new ValueTask(true)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task SingleAsync_AsyncPredicate_Cancel_NoMatch() + public async Task SingleAwaitWithCancellationAsync_Predicate_NoMatch() { - var res = Return42.SingleAsync((x, ct) => new ValueTask(x % 2 != 0)); + var res = Return42.SingleAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task SingleAsync_AsyncPredicate_Cancel_Simple() + public async Task SingleAwaitWithCancellationAsync_Predicate_Simple() { - var res = Return42.SingleAsync((x, ct) => new ValueTask(x % 2 == 0)); + var res = Return42.SingleAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 == 0)); Assert.Equal(42, await res); } [Fact] - public async Task SingleAsync_AsyncPredicate_Cancel_Throws() + public async Task SingleAwaitWithCancellationAsync_Predicate_Throws() { var ex = new Exception("Bang!"); - var res = Throw(ex).SingleAsync((x, ct) => new ValueTask(true)); + var res = Throw(ex).SingleAwaitWithCancellationAsync((x, ct) => new ValueTask(true)); await AssertThrowsAsync(res, ex); } [Fact] - public async Task SingleAsync_AsyncPredicate_Cancel_OneMatch() + public async Task SingleAwaitWithCancellationAsync_Predicate_OneMatch() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleAsync((x, ct) => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task SingleAsync_AsyncPredicate_Cancel_Throw_MoreThanOne() + public async Task SingleAwaitWithCancellationAsync_Predicate_Throw_MoreThanOne() { - var res = new[] { 42, 23, 45, 90 }.ToAsyncEnumerable().SingleAsync((x, ct) => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 23, 45, 90 }.ToAsyncEnumerable().SingleAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0)); await AssertThrowsAsync(res.AsTask()); } #endif diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SingleOrDefault.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SingleOrDefault.cs index 1e88d185bc..06f2e48ac7 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SingleOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SingleOrDefault.cs @@ -76,7 +76,7 @@ public async Task SingleOrDefaultAsync_Predicate_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAsync(Return42, default(Func)).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAsync(default, x => true, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAsync(Return42, default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] @@ -130,120 +130,120 @@ public async Task SingleOrDefaultAsync_Predicate_Throws_Source() } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_Null() + public async Task SingleOrDefaultAwaitAsync_Predicate_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAsync(default, x => new ValueTask(true)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAsync(Return42, default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAwaitAsync(default, x => new ValueTask(true)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAwaitAsync(Return42, default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAwaitAsync(default, x => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAwaitAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_Empty() + public async Task SingleOrDefaultAwaitAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().SingleOrDefaultAsync(x => new ValueTask(true)); + var res = AsyncEnumerable.Empty().SingleOrDefaultAwaitAsync(x => new ValueTask(true)); Assert.Equal(0, await res); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_NoMatch_Single() + public async Task SingleOrDefaultAwaitAsync_Predicate_NoMatch_Single() { - var res = Return42.SingleOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = Return42.SingleOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(0, await res); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_OneMatch_Single() + public async Task SingleOrDefaultAwaitAsync_Predicate_OneMatch_Single() { - var res = Return42.SingleOrDefaultAsync(x => new ValueTask(x % 2 == 0)); + var res = Return42.SingleOrDefaultAwaitAsync(x => new ValueTask(x % 2 == 0)); Assert.Equal(42, await res); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_OneMatch_Many() + public async Task SingleOrDefaultAwaitAsync_Predicate_OneMatch_Many() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAsync(x => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAwaitAsync(x => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_NoMatch_Many() + public async Task SingleOrDefaultAwaitAsync_Predicate_NoMatch_Many() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAsync(x => new ValueTask(x < 10)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAwaitAsync(x => new ValueTask(x < 10)); Assert.Equal(0, await res); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_MoreThanOne() + public async Task SingleOrDefaultAwaitAsync_Predicate_MoreThanOne() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAsync(x => new ValueTask(true)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAwaitAsync(x => new ValueTask(true)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_Throws_Source() + public async Task SingleOrDefaultAwaitAsync_Predicate_Throws_Source() { var ex = new Exception("Bang!"); - var res = Throw(ex).SingleOrDefaultAsync(x => new ValueTask(true)); + var res = Throw(ex).SingleOrDefaultAwaitAsync(x => new ValueTask(true)); await AssertThrowsAsync(res, ex); } #if !NO_DEEP_CANCELLATION [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_Cancel_Null() + public async Task SingleOrDefaultAwaitWithCancellationAsync_Predicate_Null() { - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAsync(Return42, default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAwaitWithCancellationAsync(default, (x, ct) => new ValueTask(true), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SingleOrDefaultAwaitWithCancellationAsync(Return42, default, CancellationToken.None).AsTask()); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_Cancel_Empty() + public async Task SingleOrDefaultAwaitWithCancellationAsync_Predicate_Empty() { - var res = AsyncEnumerable.Empty().SingleOrDefaultAsync((x, ct) => new ValueTask(true)); + var res = AsyncEnumerable.Empty().SingleOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(true)); Assert.Equal(0, await res); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_Cancel_NoMatch_Single() + public async Task SingleOrDefaultAwaitWithCancellationAsync_Predicate_NoMatch_Single() { - var res = Return42.SingleOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0)); + var res = Return42.SingleOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0)); Assert.Equal(0, await res); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_Cancel_OneMatch_Single() + public async Task SingleOrDefaultAwaitWithCancellationAsync_Predicate_OneMatch_Single() { - var res = Return42.SingleOrDefaultAsync((x, ct) => new ValueTask(x % 2 == 0)); + var res = Return42.SingleOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 == 0)); Assert.Equal(42, await res); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_Cancel_OneMatch_Many() + public async Task SingleOrDefaultAwaitWithCancellationAsync_Predicate_OneMatch_Many() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAsync((x, ct) => new ValueTask(x % 2 != 0)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x % 2 != 0)); Assert.Equal(45, await res); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_Cancel_NoMatch_Many() + public async Task SingleOrDefaultAwaitWithCancellationAsync_Predicate_NoMatch_Many() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAsync((x, ct) => new ValueTask(x < 10)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(x < 10)); Assert.Equal(0, await res); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_Cancel_MoreThanOne() + public async Task SingleOrDefaultAwaitWithCancellationAsync_Predicate_MoreThanOne() { - var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAsync((x, ct) => new ValueTask(true)); + var res = new[] { 42, 45, 90 }.ToAsyncEnumerable().SingleOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(true)); await AssertThrowsAsync(res.AsTask()); } [Fact] - public async Task SingleOrDefaultAsync_AsyncPredicate_Cancel_Throws_Source() + public async Task SingleOrDefaultAwaitWithCancellationAsync_Predicate_Throws_Source() { var ex = new Exception("Bang!"); - var res = Throw(ex).SingleOrDefaultAsync((x, ct) => new ValueTask(true)); + var res = Throw(ex).SingleOrDefaultAwaitWithCancellationAsync((x, ct) => new ValueTask(true)); await AssertThrowsAsync(res, ex); } #endif diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SkipWhile.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SkipWhile.cs index a7434a9c0c..cb6118a2d5 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SkipWhile.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/SkipWhile.cs @@ -13,7 +13,7 @@ namespace Tests public class SkipWhile : AsyncEnumerableTests { [Fact] - public void SkipWhile_Sync_Null() + public void SkipWhile_Null() { Assert.Throws(() => AsyncEnumerable.SkipWhile(default, x => true)); Assert.Throws(() => AsyncEnumerable.SkipWhile(default, (x, i) => true)); @@ -22,7 +22,7 @@ public void SkipWhile_Sync_Null() } [Fact] - public async Task SkipWhile_Sync_Simple1() + public async Task SkipWhile_Simple1() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.SkipWhile(x => x < 3); @@ -34,7 +34,7 @@ public async Task SkipWhile_Sync_Simple1() } [Fact] - public async Task SkipWhile_Sync_Simple2() + public async Task SkipWhile_Simple2() { var xs = new[] { 1, 2, 3, 4, 3, 2, 1 }.ToAsyncEnumerable(); var ys = xs.SkipWhile(x => x < 3); @@ -49,7 +49,7 @@ public async Task SkipWhile_Sync_Simple2() } [Fact] - public async Task SkipWhile_Sync_False() + public async Task SkipWhile_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.SkipWhile(x => false); @@ -63,7 +63,7 @@ public async Task SkipWhile_Sync_False() } [Fact] - public async Task SkipWhile_Sync_True() + public async Task SkipWhile_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.SkipWhile(x => true); @@ -73,7 +73,7 @@ public async Task SkipWhile_Sync_True() } [Fact] - public async Task SkipWhile_Sync_Throws_Predicate() + public async Task SkipWhile_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); @@ -84,7 +84,7 @@ public async Task SkipWhile_Sync_Throws_Predicate() } [Fact] - public async Task SkipWhile_Sync_Indexed() + public async Task SkipWhile_Indexed() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.SkipWhile((x, i) => i < 2); @@ -96,7 +96,7 @@ public async Task SkipWhile_Sync_Indexed() } [Fact] - public async Task SkipWhile_Sync_Indexed_False() + public async Task SkipWhile_Indexed_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.SkipWhile((x, i) => false); @@ -110,7 +110,7 @@ public async Task SkipWhile_Sync_Indexed_False() } [Fact] - public async Task SkipWhile_Sync_Indexed_True() + public async Task SkipWhile_Indexed_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.SkipWhile((x, i) => true); @@ -120,7 +120,7 @@ public async Task SkipWhile_Sync_Indexed_True() } [Fact] - public async Task SkipWhile_Sync_Indexed_Throws_Predicate() + public async Task SkipWhile_Indexed_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); @@ -131,7 +131,7 @@ public async Task SkipWhile_Sync_Indexed_Throws_Predicate() } [Fact] - public async Task SkipWhile_Sync_SequenceIdentity() + public async Task SkipWhile_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.SkipWhile(x => x < 3); @@ -140,7 +140,7 @@ public async Task SkipWhile_Sync_SequenceIdentity() } [Fact] - public async Task SkipWhile_Sync_Indexed_SequenceIdentity() + public async Task SkipWhile_Indexed_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.SkipWhile((x, i) => false); @@ -149,19 +149,19 @@ public async Task SkipWhile_Sync_Indexed_SequenceIdentity() } [Fact] - public void SkipWhile_Async_Null() + public void SkipWhileAwait_Null() { - Assert.Throws(() => AsyncEnumerable.SkipWhile(default, x => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.SkipWhile(default, (int x, int i) => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.SkipWhile(Return42, default(Func>))); - Assert.Throws(() => AsyncEnumerable.SkipWhile(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.SkipWhileAwait(default, x => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.SkipWhileAwait(default, (int x, int i) => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.SkipWhileAwait(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.SkipWhileAwait(Return42, default(Func>))); } [Fact] - public async Task SkipWhile_Async_Simple1() + public async Task SkipWhileAwait_Simple1() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile(x => new ValueTask(x < 3)); + var ys = xs.SkipWhileAwait(x => new ValueTask(x < 3)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 3); @@ -170,10 +170,10 @@ public async Task SkipWhile_Async_Simple1() } [Fact] - public async Task SkipWhile_Async_Simple2() + public async Task SkipWhileAwait_Simple2() { var xs = new[] { 1, 2, 3, 4, 3, 2, 1 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile(x => new ValueTask(x < 3)); + var ys = xs.SkipWhileAwait(x => new ValueTask(x < 3)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 3); @@ -185,10 +185,10 @@ public async Task SkipWhile_Async_Simple2() } [Fact] - public async Task SkipWhile_Async_False() + public async Task SkipWhileAwait_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile(x => new ValueTask(false)); + var ys = xs.SkipWhileAwait(x => new ValueTask(false)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -199,31 +199,31 @@ public async Task SkipWhile_Async_False() } [Fact] - public async Task SkipWhile_Async_True() + public async Task SkipWhileAwait_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile(x => new ValueTask(true)); + var ys = xs.SkipWhileAwait(x => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await NoNextAsync(e); } [Fact] - public async Task SkipWhile_Async_Throws_Predicate() + public async Task SkipWhileAwait_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile(new Func>(x => { throw ex; })); + var ys = xs.SkipWhileAwait(new Func>(x => { throw ex; })); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task SkipWhile_Async_Indexed() + public async Task SkipWhileAwait_Indexed() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((x, i) => new ValueTask(i < 2)); + var ys = xs.SkipWhileAwait((x, i) => new ValueTask(i < 2)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 3); @@ -232,10 +232,10 @@ public async Task SkipWhile_Async_Indexed() } [Fact] - public async Task SkipWhile_Async_Indexed_False() + public async Task SkipWhileAwait_Indexed_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((int x, int i) => new ValueTask(false)); + var ys = xs.SkipWhileAwait((int x, int i) => new ValueTask(false)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -246,40 +246,40 @@ public async Task SkipWhile_Async_Indexed_False() } [Fact] - public async Task SkipWhile_Async_Indexed_True() + public async Task SkipWhileAwait_Indexed_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((int x, int i) => new ValueTask(true)); + var ys = xs.SkipWhileAwait((int x, int i) => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await NoNextAsync(e); } [Fact] - public async Task SkipWhile_Async_Indexed_Throws_Predicate() + public async Task SkipWhileAwait_Indexed_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile(new Func>((x, i) => { throw ex; })); + var ys = xs.SkipWhileAwait(new Func>((x, i) => { throw ex; })); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task SkipWhile_Async_SequenceIdentity() + public async Task SkipWhileAwait_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile(x => new ValueTask(x < 3)); + var ys = xs.SkipWhileAwait(x => new ValueTask(x < 3)); await SequenceIdentity(ys); } [Fact] - public async Task SkipWhile_Async_Indexed_SequenceIdentity() + public async Task SkipWhileAwait_Indexed_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((int x, int i) => new ValueTask(false)); + var ys = xs.SkipWhileAwait((int x, int i) => new ValueTask(false)); await SequenceIdentity(ys); } @@ -287,19 +287,19 @@ public async Task SkipWhile_Async_Indexed_SequenceIdentity() #if !NO_DEEP_CANCELLATION [Fact] - public void SkipWhile_Async_Cancel_Null() + public void SkipWhileAwaitWithCancellation_Null() { - Assert.Throws(() => AsyncEnumerable.SkipWhile(default, (int x, CancellationToken ct) => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.SkipWhile(default, (x, i, ct) => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.SkipWhile(Return42, default(Func>))); - Assert.Throws(() => AsyncEnumerable.SkipWhile(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.SkipWhileAwaitWithCancellation(default, (int x, CancellationToken ct) => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.SkipWhileAwaitWithCancellation(default, (x, i, ct) => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.SkipWhileAwaitWithCancellation(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.SkipWhileAwaitWithCancellation(Return42, default(Func>))); } [Fact] - public async Task SkipWhile_Async_Cancel_Simple1() + public async Task SkipWhileAwaitWithCancellation_Simple1() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((int x, CancellationToken ct) => new ValueTask(x < 3)); + var ys = xs.SkipWhileAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x < 3)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 3); @@ -308,10 +308,10 @@ public async Task SkipWhile_Async_Cancel_Simple1() } [Fact] - public async Task SkipWhile_Async_Cancel_Simple2() + public async Task SkipWhileAwaitWithCancellation_Simple2() { var xs = new[] { 1, 2, 3, 4, 3, 2, 1 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((int x, CancellationToken ct) => new ValueTask(x < 3)); + var ys = xs.SkipWhileAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x < 3)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 3); @@ -323,10 +323,10 @@ public async Task SkipWhile_Async_Cancel_Simple2() } [Fact] - public async Task SkipWhile_Async_Cancel_False() + public async Task SkipWhileAwaitWithCancellation_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((int x, CancellationToken ct) => new ValueTask(false)); + var ys = xs.SkipWhileAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(false)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -337,31 +337,31 @@ public async Task SkipWhile_Async_Cancel_False() } [Fact] - public async Task SkipWhile_Async_Cancel_True() + public async Task SkipWhileAwaitWithCancellation_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((int x, CancellationToken ct) => new ValueTask(true)); + var ys = xs.SkipWhileAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await NoNextAsync(e); } [Fact] - public async Task SkipWhile_Async_Cancel_Throws_Predicate() + public async Task SkipWhileAwaitWithCancellation_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile(new Func>((x, ct) => { throw ex; })); + var ys = xs.SkipWhileAwaitWithCancellation(new Func>((x, ct) => { throw ex; })); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task SkipWhile_Async_Cancel_Indexed() + public async Task SkipWhileAwaitWithCancellation_Indexed() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((x, i, ct) => new ValueTask(i < 2)); + var ys = xs.SkipWhileAwaitWithCancellation((x, i, ct) => new ValueTask(i < 2)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 3); @@ -370,10 +370,10 @@ public async Task SkipWhile_Async_Cancel_Indexed() } [Fact] - public async Task SkipWhile_Async_Cancel_Indexed_False() + public async Task SkipWhileAwaitWithCancellation_Indexed_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((x, i, ct) => new ValueTask(false)); + var ys = xs.SkipWhileAwaitWithCancellation((x, i, ct) => new ValueTask(false)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -384,40 +384,40 @@ public async Task SkipWhile_Async_Cancel_Indexed_False() } [Fact] - public async Task SkipWhile_Async_Cancel_Indexed_True() + public async Task SkipWhileAwaitWithCancellation_Indexed_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((x, i, ct) => new ValueTask(true)); + var ys = xs.SkipWhileAwaitWithCancellation((x, i, ct) => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await NoNextAsync(e); } [Fact] - public async Task SkipWhile_Async_Cancel_Indexed_Throws_Predicate() + public async Task SkipWhileAwaitWithCancellation_Indexed_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile(new Func>((x, i, ct) => { throw ex; })); + var ys = xs.SkipWhileAwaitWithCancellation(new Func>((x, i, ct) => { throw ex; })); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task SkipWhile_Async_Cancel_SequenceIdentity() + public async Task SkipWhileAwaitWithCancellation_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((int x, CancellationToken ct) => new ValueTask(x < 3)); + var ys = xs.SkipWhileAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x < 3)); await SequenceIdentity(ys); } [Fact] - public async Task SkipWhile_Async_Cancel_Indexed_SequenceIdentity() + public async Task SkipWhileAwaitWithCancellation_Indexed_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.SkipWhile((x, i, ct) => new ValueTask(false)); + var ys = xs.SkipWhileAwaitWithCancellation((x, i, ct) => new ValueTask(false)); await SequenceIdentity(ys); } diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Sum.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Sum.cs index c70cb0bb48..b495e0c0f9 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Sum.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Sum.cs @@ -79,7 +79,7 @@ public async Task Sum_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => x, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => x, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func), CancellationToken.None).AsTask()); @@ -92,76 +92,76 @@ public async Task Sum_Null() // Sum(IAE, Func>) - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>)).AsTask()); // Sum(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(default(IAsyncEnumerable), x => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #if !NO_DEEP_CANCELLATION // Sum(IAE, Func>, CT) - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(default(IAsyncEnumerable), (x, ct) => new ValueTask(x), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.SumAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.SumAwaitWithCancellationAsync(AsyncEnumerable.Empty(), default(Func>), CancellationToken.None).AsTask()); #endif } @@ -172,7 +172,7 @@ public async Task Sum1Async() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Sum(), await ys.SumAsync()); Assert.Equal(xs.Sum(), await ys.SumAsync(x => x)); - Assert.Equal(xs.Sum(), await ys.SumAsync(x => new ValueTask(x))); + Assert.Equal(xs.Sum(), await ys.SumAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -182,7 +182,7 @@ public async Task Sum2Async() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Sum(), await ys.SumAsync()); Assert.Equal(xs.Sum(), await ys.SumAsync(x => x)); - Assert.Equal(xs.Sum(), await ys.SumAsync(x => new ValueTask(x))); + Assert.Equal(xs.Sum(), await ys.SumAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -192,7 +192,7 @@ public async Task Sum3Async() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Sum(), await ys.SumAsync()); Assert.Equal(xs.Sum(), await ys.SumAsync(x => x)); - Assert.Equal(xs.Sum(), await ys.SumAsync(x => new ValueTask(x))); + Assert.Equal(xs.Sum(), await ys.SumAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -202,7 +202,7 @@ public async Task Sum4Async() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Sum(), await ys.SumAsync()); Assert.Equal(xs.Sum(), await ys.SumAsync(x => x)); - Assert.Equal(xs.Sum(), await ys.SumAsync(x => new ValueTask(x))); + Assert.Equal(xs.Sum(), await ys.SumAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -212,7 +212,7 @@ public async Task Sum5Async() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Sum(), await ys.SumAsync()); Assert.Equal(xs.Sum(), await ys.SumAsync(x => x)); - Assert.Equal(xs.Sum(), await ys.SumAsync(x => new ValueTask(x))); + Assert.Equal(xs.Sum(), await ys.SumAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -222,7 +222,7 @@ public async Task Sum6Async() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Sum(), await ys.SumAsync()); Assert.Equal(xs.Sum(), await ys.SumAsync(x => x)); - Assert.Equal(xs.Sum(), await ys.SumAsync(x => new ValueTask(x))); + Assert.Equal(xs.Sum(), await ys.SumAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -232,7 +232,7 @@ public async Task Sum7Async() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Sum(), await ys.SumAsync()); Assert.Equal(xs.Sum(), await ys.SumAsync(x => x)); - Assert.Equal(xs.Sum(), await ys.SumAsync(x => new ValueTask(x))); + Assert.Equal(xs.Sum(), await ys.SumAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -242,7 +242,7 @@ public async Task Sum8Async() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Sum(), await ys.SumAsync()); Assert.Equal(xs.Sum(), await ys.SumAsync(x => x)); - Assert.Equal(xs.Sum(), await ys.SumAsync(x => new ValueTask(x))); + Assert.Equal(xs.Sum(), await ys.SumAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -252,7 +252,7 @@ public async Task Sum9Async() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Sum(), await ys.SumAsync()); Assert.Equal(xs.Sum(), await ys.SumAsync(x => x)); - Assert.Equal(xs.Sum(), await ys.SumAsync(x => new ValueTask(x))); + Assert.Equal(xs.Sum(), await ys.SumAwaitAsync(x => new ValueTask(x))); } [Fact] @@ -262,7 +262,7 @@ public async Task Sum10Async() var ys = xs.ToAsyncEnumerable(); Assert.Equal(xs.Sum(), await ys.SumAsync()); Assert.Equal(xs.Sum(), await ys.SumAsync(x => x)); - Assert.Equal(xs.Sum(), await ys.SumAsync(x => new ValueTask(x))); + Assert.Equal(xs.Sum(), await ys.SumAwaitAsync(x => new ValueTask(x))); } } } diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/TakeWhile.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/TakeWhile.cs index 57c397650f..d8ae67acd9 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/TakeWhile.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/TakeWhile.cs @@ -13,7 +13,7 @@ namespace Tests public class TakeWhile : AsyncEnumerableTests { [Fact] - public void TakeWhile_Sync_Null() + public void TakeWhile_Null() { Assert.Throws(() => AsyncEnumerable.TakeWhile(default, x => true)); Assert.Throws(() => AsyncEnumerable.TakeWhile(default, (x, i) => true)); @@ -22,7 +22,7 @@ public void TakeWhile_Sync_Null() } [Fact] - public async Task TakeWhile_Sync_Simple1() + public async Task TakeWhile_Simple1() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.TakeWhile(x => x < 3); @@ -34,7 +34,7 @@ public async Task TakeWhile_Sync_Simple1() } [Fact] - public async Task TakeWhile_Sync_Simple2() + public async Task TakeWhile_Simple2() { var xs = new[] { 1, 2, 3, 4, 3, 2, 1 }.ToAsyncEnumerable(); var ys = xs.TakeWhile(x => x < 3); @@ -46,7 +46,7 @@ public async Task TakeWhile_Sync_Simple2() } [Fact] - public async Task TakeWhile_Sync_False() + public async Task TakeWhile_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.TakeWhile(x => false); @@ -56,7 +56,7 @@ public async Task TakeWhile_Sync_False() } [Fact] - public async Task TakeWhile_Sync_True() + public async Task TakeWhile_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.TakeWhile(x => true); @@ -70,7 +70,7 @@ public async Task TakeWhile_Sync_True() } [Fact] - public async Task TakeWhile_Sync_Throws_Predicate() + public async Task TakeWhile_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); @@ -81,7 +81,7 @@ public async Task TakeWhile_Sync_Throws_Predicate() } [Fact] - public async Task TakeWhile_Sync_Indexed() + public async Task TakeWhile_Indexed() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.TakeWhile((x, i) => i < 2); @@ -93,7 +93,7 @@ public async Task TakeWhile_Sync_Indexed() } [Fact] - public async Task TakeWhile_Sync_Indexed_False() + public async Task TakeWhile_Indexed_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.TakeWhile((x, i) => false); @@ -103,7 +103,7 @@ public async Task TakeWhile_Sync_Indexed_False() } [Fact] - public async Task TakeWhile_Sync_Indexed_True() + public async Task TakeWhile_Indexed_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.TakeWhile((x, i) => true); @@ -117,7 +117,7 @@ public async Task TakeWhile_Sync_Indexed_True() } [Fact] - public async Task TakeWhile_Sync_Indexed_Throws_Predicate() + public async Task TakeWhile_Indexed_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); @@ -128,7 +128,7 @@ public async Task TakeWhile_Sync_Indexed_Throws_Predicate() } [Fact] - public async Task TakeWhile_Sync_SequenceIdentity() + public async Task TakeWhile_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.TakeWhile(x => x < 3); @@ -137,7 +137,7 @@ public async Task TakeWhile_Sync_SequenceIdentity() } [Fact] - public async Task TakeWhile_Sync_Indexed_SequenceIdentity() + public async Task TakeWhile_Indexed_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); var ys = xs.TakeWhile((x, i) => i < 2); @@ -146,19 +146,19 @@ public async Task TakeWhile_Sync_Indexed_SequenceIdentity() } [Fact] - public void TakeWhile_Async_Null() + public void TakeWhileAwait_Null() { - Assert.Throws(() => AsyncEnumerable.TakeWhile(default, x => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.TakeWhile(default, (int x, int i) => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.TakeWhile(Return42, default(Func>))); - Assert.Throws(() => AsyncEnumerable.TakeWhile(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.TakeWhileAwait(default, x => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.TakeWhileAwait(default, (int x, int i) => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.TakeWhileAwait(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.TakeWhileAwait(Return42, default(Func>))); } [Fact] - public async Task TakeWhile_Async_Simple1() + public async Task TakeWhileAwait_Simple1() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile(x => new ValueTask(x < 3)); + var ys = xs.TakeWhileAwait(x => new ValueTask(x < 3)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -167,10 +167,10 @@ public async Task TakeWhile_Async_Simple1() } [Fact] - public async Task TakeWhile_Async_Simple2() + public async Task TakeWhileAwait_Simple2() { var xs = new[] { 1, 2, 3, 4, 3, 2, 1 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile(x => new ValueTask(x < 3)); + var ys = xs.TakeWhileAwait(x => new ValueTask(x < 3)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -179,20 +179,20 @@ public async Task TakeWhile_Async_Simple2() } [Fact] - public async Task TakeWhile_Async_False() + public async Task TakeWhileAwait_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile(x => new ValueTask(false)); + var ys = xs.TakeWhileAwait(x => new ValueTask(false)); var e = ys.GetAsyncEnumerator(); await NoNextAsync(e); } [Fact] - public async Task TakeWhile_Async_True() + public async Task TakeWhileAwait_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile(x => new ValueTask(true)); + var ys = xs.TakeWhileAwait(x => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -203,21 +203,21 @@ public async Task TakeWhile_Async_True() } [Fact] - public async Task TakeWhile_Async_Throws_Predicate() + public async Task TakeWhileAwait_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile(new Func>(x => { throw ex; })); + var ys = xs.TakeWhileAwait(new Func>(x => { throw ex; })); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task TakeWhile_Async_Indexed() + public async Task TakeWhileAwait_Indexed() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((x, i) => new ValueTask(i < 2)); + var ys = xs.TakeWhileAwait((x, i) => new ValueTask(i < 2)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -226,20 +226,20 @@ public async Task TakeWhile_Async_Indexed() } [Fact] - public async Task TakeWhile_Async_Indexed_False() + public async Task TakeWhileAwait_Indexed_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((int x, int i) => new ValueTask(false)); + var ys = xs.TakeWhileAwait((int x, int i) => new ValueTask(false)); var e = ys.GetAsyncEnumerator(); await NoNextAsync(e); } [Fact] - public async Task TakeWhile_Async_Indexed_True() + public async Task TakeWhileAwait_Indexed_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((int x, int i) => new ValueTask(true)); + var ys = xs.TakeWhileAwait((int x, int i) => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -250,30 +250,30 @@ public async Task TakeWhile_Async_Indexed_True() } [Fact] - public async Task TakeWhile_Async_Indexed_Throws_Predicate() + public async Task TakeWhileAwait_Indexed_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile(new Func>((x, i) => { throw ex; })); + var ys = xs.TakeWhileAwait(new Func>((x, i) => { throw ex; })); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task TakeWhile_Async_SequenceIdentity() + public async Task TakeWhileAwait_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile(x => new ValueTask(x < 3)); + var ys = xs.TakeWhileAwait(x => new ValueTask(x < 3)); await SequenceIdentity(ys); } [Fact] - public async Task TakeWhile_Async_Indexed_SequenceIdentity() + public async Task TakeWhileAwait_Indexed_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((x, i) => new ValueTask(i < 2)); + var ys = xs.TakeWhileAwait((x, i) => new ValueTask(i < 2)); await SequenceIdentity(ys); } @@ -281,19 +281,19 @@ public async Task TakeWhile_Async_Indexed_SequenceIdentity() #if !NO_DEEP_CANCELLATION [Fact] - public void TakeWhile_Async_Cancel_Null() + public void TakeWhileAwaitWithCancellation_Null() { - Assert.Throws(() => AsyncEnumerable.TakeWhile(default, (int x, CancellationToken ct) => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.TakeWhile(default, (x, i, ct) => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.TakeWhile(Return42, default(Func>))); - Assert.Throws(() => AsyncEnumerable.TakeWhile(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.TakeWhileAwaitWithCancellation(default, (int x, CancellationToken ct) => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.TakeWhileAwaitWithCancellation(default, (x, i, ct) => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.TakeWhileAwaitWithCancellation(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.TakeWhileAwaitWithCancellation(Return42, default(Func>))); } [Fact] - public async Task TakeWhile_Async_Cancel_Simple1() + public async Task TakeWhileAwaitWithCancellation_Simple1() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((int x, CancellationToken ct) => new ValueTask(x < 3)); + var ys = xs.TakeWhileAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x < 3)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -302,10 +302,10 @@ public async Task TakeWhile_Async_Cancel_Simple1() } [Fact] - public async Task TakeWhile_Async_Cancel_Simple2() + public async Task TakeWhileAwaitWithCancellation_Simple2() { var xs = new[] { 1, 2, 3, 4, 3, 2, 1 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((int x, CancellationToken ct) => new ValueTask(x < 3)); + var ys = xs.TakeWhileAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x < 3)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -314,20 +314,20 @@ public async Task TakeWhile_Async_Cancel_Simple2() } [Fact] - public async Task TakeWhile_Async_Cancel_False() + public async Task TakeWhileAwaitWithCancellation_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((int x, CancellationToken ct) => new ValueTask(false)); + var ys = xs.TakeWhileAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(false)); var e = ys.GetAsyncEnumerator(); await NoNextAsync(e); } [Fact] - public async Task TakeWhile_Async_Cancel_True() + public async Task TakeWhileAwaitWithCancellation_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((int x, CancellationToken ct) => new ValueTask(true)); + var ys = xs.TakeWhileAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -338,21 +338,21 @@ public async Task TakeWhile_Async_Cancel_True() } [Fact] - public async Task TakeWhile_Async_Cancel_Throws_Predicate() + public async Task TakeWhileAwaitWithCancellation_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile(new Func>((x, ct) => { throw ex; })); + var ys = xs.TakeWhileAwaitWithCancellation(new Func>((x, ct) => { throw ex; })); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task TakeWhile_Async_Cancel_Indexed() + public async Task TakeWhileAwaitWithCancellation_Indexed() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((x, i, ct) => new ValueTask(i < 2)); + var ys = xs.TakeWhileAwaitWithCancellation((x, i, ct) => new ValueTask(i < 2)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -361,20 +361,20 @@ public async Task TakeWhile_Async_Cancel_Indexed() } [Fact] - public async Task TakeWhile_Async_Cancel_Indexed_False() + public async Task TakeWhileAwaitWithCancellation_Indexed_False() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((x, i, ct) => new ValueTask(false)); + var ys = xs.TakeWhileAwaitWithCancellation((x, i, ct) => new ValueTask(false)); var e = ys.GetAsyncEnumerator(); await NoNextAsync(e); } [Fact] - public async Task TakeWhile_Async_Cancel_Indexed_True() + public async Task TakeWhileAwaitWithCancellation_Indexed_True() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((x, i, ct) => new ValueTask(true)); + var ys = xs.TakeWhileAwaitWithCancellation((x, i, ct) => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 1); @@ -385,30 +385,30 @@ public async Task TakeWhile_Async_Cancel_Indexed_True() } [Fact] - public async Task TakeWhile_Async_Cancel_Indexed_Throws_Predicate() + public async Task TakeWhileAwaitWithCancellation_Indexed_Throws_Predicate() { var ex = new Exception("Bang"); var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile(new Func>((x, ct, i) => { throw ex; })); + var ys = xs.TakeWhileAwaitWithCancellation(new Func>((x, ct, i) => { throw ex; })); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task TakeWhile_Async_Cancel_SequenceIdentity() + public async Task TakeWhileAwaitWithCancellation_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((int x, CancellationToken ct) => new ValueTask(x < 3)); + var ys = xs.TakeWhileAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x < 3)); await SequenceIdentity(ys); } [Fact] - public async Task TakeWhile_Async_Cancel_Indexed_SequenceIdentity() + public async Task TakeWhileAwaitWithCancellation_Indexed_SequenceIdentity() { var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable(); - var ys = xs.TakeWhile((x, i, ct) => new ValueTask(i < 2)); + var ys = xs.TakeWhileAwaitWithCancellation((x, i, ct) => new ValueTask(i < 2)); await SequenceIdentity(ys); } diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToDictionary.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToDictionary.cs index c5e99d2982..6f2d4ef65b 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToDictionary.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToDictionary.cs @@ -20,7 +20,7 @@ public async Task ToDictionary_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(Return42, default(Func)).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(default, x => 0, EqualityComparer.Default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(Return42, default(Func), EqualityComparer.Default).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(Return42, default, EqualityComparer.Default).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(default, x => 0, x => 0).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(Return42, default, x => 0).AsTask()); @@ -34,7 +34,7 @@ public async Task ToDictionary_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(Return42, default(Func), CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(default, x => 0, EqualityComparer.Default, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(Return42, default(Func), EqualityComparer.Default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(Return42, default, EqualityComparer.Default, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(default, x => 0, x => 0, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToDictionaryAsync(Return42, default, x => 0, CancellationToken.None).AsTask()); diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToLookup.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToLookup.cs index 0a95b6bfbb..f7b2cd86ea 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToLookup.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/ToLookup.cs @@ -21,7 +21,7 @@ public async Task ToLookup_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(Return42, default(Func)).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(default, x => 0, EqualityComparer.Default).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(Return42, default(Func), EqualityComparer.Default).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(Return42, default, EqualityComparer.Default).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(default, x => 0, x => 0).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(Return42, default, x => 0).AsTask()); @@ -35,7 +35,7 @@ public async Task ToLookup_Null() await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(Return42, default(Func), CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(default, x => 0, EqualityComparer.Default, CancellationToken.None).AsTask()); - await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(Return42, default(Func), EqualityComparer.Default, CancellationToken.None).AsTask()); + await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(Return42, default, EqualityComparer.Default, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(default, x => 0, x => 0, CancellationToken.None).AsTask()); await Assert.ThrowsAsync(() => AsyncEnumerable.ToLookupAsync(Return42, default, x => 0, CancellationToken.None).AsTask()); diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Where.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Where.cs index 4bfceb30c1..b8eb4c299d 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Where.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Where.cs @@ -13,7 +13,7 @@ namespace Tests public class Where : AsyncEnumerableTests { [Fact] - public void Where_Sync_Null() + public void Where_Null() { Assert.Throws(() => AsyncEnumerable.Where(default, x => true)); Assert.Throws(() => AsyncEnumerable.Where(default, (x, i) => true)); @@ -22,7 +22,7 @@ public void Where_Sync_Null() } [Fact] - public async Task Where_Sync_Simple() + public async Task Where_Simple() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); var ys = xs.Where(x => x % 2 == 0); @@ -36,7 +36,7 @@ public async Task Where_Sync_Simple() } [Fact] - public async Task Where_Sync_Indexed() + public async Task Where_Indexed() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); var ys = xs.Where((x, i) => i % 2 == 0); @@ -51,7 +51,7 @@ public async Task Where_Sync_Indexed() } [Fact] - public async Task Where_Sync_Throws_Predicate() + public async Task Where_Throws_Predicate() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); var ex = new Exception("Bang"); @@ -65,7 +65,7 @@ public async Task Where_Sync_Throws_Predicate() } [Fact] - public async Task Where_Sync_Indexed_Throws_Predicate() + public async Task Where_Indexed_Throws_Predicate() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); var ex = new Exception("Bang"); @@ -79,7 +79,7 @@ public async Task Where_Sync_Indexed_Throws_Predicate() } [Fact] - public async Task Where_Sync_Throws_Source() + public async Task Where_Throws_Source() { var ex = new Exception("Bang"); var xs = Throw(ex); @@ -90,7 +90,7 @@ public async Task Where_Sync_Throws_Source() } [Fact] - public async Task Where_Sync_Indexed_Throws_Source() + public async Task Where_Indexed_Throws_Source() { var ex = new Exception("Bang"); var xs = Throw(ex); @@ -101,7 +101,7 @@ public async Task Where_Sync_Indexed_Throws_Source() } [Fact] - public async Task Where_Sync_WhereWhere() + public async Task Where_WhereWhere() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); var ys = xs.Where(x => x % 2 == 0).Where(x => x > 5); @@ -112,7 +112,7 @@ public async Task Where_Sync_WhereWhere() } [Fact] - public async Task Where_Sync_SequenceIdentity() + public async Task Where_SequenceIdentity() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); var ys = xs.Where(x => x % 2 == 0); @@ -121,7 +121,7 @@ public async Task Where_Sync_SequenceIdentity() } [Fact] - public async Task Where_Sync_Indexed_SequenceIdentity() + public async Task Where_Indexed_SequenceIdentity() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); var ys = xs.Where((x, i) => i % 2 == 0); @@ -130,19 +130,19 @@ public async Task Where_Sync_Indexed_SequenceIdentity() } [Fact] - public void Where_Async_Null() + public void WhereAwait_Null() { - Assert.Throws(() => AsyncEnumerable.Where(default, x => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.Where(default, (int x, int i) => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.Where(Return42, default(Func>))); - Assert.Throws(() => AsyncEnumerable.Where(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.WhereAwait(default, x => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.WhereAwait(default, (int x, int i) => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.WhereAwait(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.WhereAwait(Return42, default(Func>))); } [Fact] - public async Task Where_Async_Simple() + public async Task WhereAwait_Simple() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); - var ys = xs.Where(x => new ValueTask(x % 2 == 0)); + var ys = xs.WhereAwait(x => new ValueTask(x % 2 == 0)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 8); await HasNextAsync(e, 4); @@ -153,10 +153,10 @@ public async Task Where_Async_Simple() } [Fact] - public async Task Where_Async_Indexed() + public async Task WhereAwait_Indexed() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); - var ys = xs.Where((x, i) => new ValueTask(i % 2 == 0)); + var ys = xs.WhereAwait((x, i) => new ValueTask(i % 2 == 0)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 8); @@ -168,11 +168,11 @@ public async Task Where_Async_Indexed() } [Fact] - public async Task Where_Async_Throws_Predicate() + public async Task WhereAwait_Throws_Predicate() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); var ex = new Exception("Bang"); - var ys = xs.Where(x => { if (x == 4) throw ex; return new ValueTask(true); }); + var ys = xs.WhereAwait(x => { if (x == 4) throw ex; return new ValueTask(true); }); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 8); @@ -182,11 +182,11 @@ public async Task Where_Async_Throws_Predicate() } [Fact] - public async Task Where_Async_Indexed_Throws_Predicate() + public async Task WhereAwait_Indexed_Throws_Predicate() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); var ex = new Exception("Bang"); - var ys = xs.Where((x, i) => { if (i == 3) throw ex; return new ValueTask(true); }); + var ys = xs.WhereAwait((x, i) => { if (i == 3) throw ex; return new ValueTask(true); }); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 8); @@ -196,32 +196,32 @@ public async Task Where_Async_Indexed_Throws_Predicate() } [Fact] - public async Task Where_Async_Throws_Source() + public async Task WhereAwait_Throws_Source() { var ex = new Exception("Bang"); var xs = Throw(ex); - var ys = xs.Where(x => new ValueTask(true)); + var ys = xs.WhereAwait(x => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task Where_Async_Indexed_Throws_Source() + public async Task WhereAwait_Indexed_Throws_Source() { var ex = new Exception("Bang"); var xs = Throw(ex); - var ys = xs.Where((int x, int i) => new ValueTask(true)); + var ys = xs.WhereAwait((int x, int i) => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task Where_Async_WhereWhere() + public async Task WhereAwait_WhereWhere() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); - var ys = xs.Where(x => new ValueTask(x % 2 == 0)).Where(x => new ValueTask(x > 5)); + var ys = xs.WhereAwait(x => new ValueTask(x % 2 == 0)).WhereAwait(x => new ValueTask(x > 5)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 8); await HasNextAsync(e, 6); @@ -229,41 +229,39 @@ public async Task Where_Async_WhereWhere() } [Fact] - public async Task Where_Async_SequenceIdentity() + public async Task WhereAwait_SequenceIdentity() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); - var ys = xs.Where(x => new ValueTask(x % 2 == 0)); + var ys = xs.WhereAwait(x => new ValueTask(x % 2 == 0)); await SequenceIdentity(ys); } [Fact] - public async Task Where_Async_Indexed_SequenceIdentity() + public async Task WhereAwait_Indexed_SequenceIdentity() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); - var ys = xs.Where((x, i) => new ValueTask(i % 2 == 0)); + var ys = xs.WhereAwait((x, i) => new ValueTask(i % 2 == 0)); await SequenceIdentity(ys); } #if !NO_DEEP_CANCELLATION - // REVIEW: These overloads are problematic for type inference. E.g. xs.Where((x, ct) => ...) is ambiguous. - [Fact] - public void Where_Async_Cancel_Null() + public void WhereAwaitWithCancellation_Null() { - Assert.Throws(() => AsyncEnumerable.Where(default, (int x, CancellationToken ct) => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.Where(default, (x, i, ct) => new ValueTask(true))); - Assert.Throws(() => AsyncEnumerable.Where(Return42, default(Func>))); - Assert.Throws(() => AsyncEnumerable.Where(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.WhereAwaitWithCancellation(default, (int x, CancellationToken ct) => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.WhereAwaitWithCancellation(default, (x, i, ct) => new ValueTask(true))); + Assert.Throws(() => AsyncEnumerable.WhereAwaitWithCancellation(Return42, default(Func>))); + Assert.Throws(() => AsyncEnumerable.WhereAwaitWithCancellation(Return42, default(Func>))); } [Fact] - public async Task Where_Async_Cancel_Simple() + public async Task WhereAwaitWithCancellation_Simple() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); - var ys = xs.Where((int x, CancellationToken ct) => new ValueTask(x % 2 == 0)); + var ys = xs.WhereAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x % 2 == 0)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 8); await HasNextAsync(e, 4); @@ -274,10 +272,10 @@ public async Task Where_Async_Cancel_Simple() } [Fact] - public async Task Where_Async_Cancel_Indexed() + public async Task WhereAwaitWithCancellation_Indexed() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); - var ys = xs.Where((x, i, ct) => new ValueTask(i % 2 == 0)); + var ys = xs.WhereAwaitWithCancellation((x, i, ct) => new ValueTask(i % 2 == 0)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 8); @@ -289,11 +287,11 @@ public async Task Where_Async_Cancel_Indexed() } [Fact] - public async Task Where_Async_Cancel_Throws_Predicate() + public async Task WhereAwaitWithCancellation_Throws_Predicate() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); var ex = new Exception("Bang"); - var ys = xs.Where((int x, CancellationToken ct) => { if (x == 4) throw ex; return new ValueTask(true); }); + var ys = xs.WhereAwaitWithCancellation((int x, CancellationToken ct) => { if (x == 4) throw ex; return new ValueTask(true); }); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 8); @@ -303,11 +301,11 @@ public async Task Where_Async_Cancel_Throws_Predicate() } [Fact] - public async Task Where_Async_Cancel_Indexed_Throws_Predicate() + public async Task WhereAwaitWithCancellation_Indexed_Throws_Predicate() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); var ex = new Exception("Bang"); - var ys = xs.Where((x, i, ct) => { if (i == 3) throw ex; return new ValueTask(true); }); + var ys = xs.WhereAwaitWithCancellation((x, i, ct) => { if (i == 3) throw ex; return new ValueTask(true); }); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 8); @@ -317,32 +315,32 @@ public async Task Where_Async_Cancel_Indexed_Throws_Predicate() } [Fact] - public async Task Where_Async_Cancel_Throws_Source() + public async Task WhereAwaitWithCancellation_Throws_Source() { var ex = new Exception("Bang"); var xs = Throw(ex); - var ys = xs.Where((int x, CancellationToken ct) => new ValueTask(true)); + var ys = xs.WhereAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task Where_Async_Cancel_Indexed_Throws_Source() + public async Task WhereAwaitWithCancellation_Indexed_Throws_Source() { var ex = new Exception("Bang"); var xs = Throw(ex); - var ys = xs.Where((x, i, ct) => new ValueTask(true)); + var ys = xs.WhereAwaitWithCancellation((x, i, ct) => new ValueTask(true)); var e = ys.GetAsyncEnumerator(); await AssertThrowsAsync(e.MoveNextAsync(), ex); } [Fact] - public async Task Where_Async_Cancel_WhereWhere() + public async Task WhereAwaitWithCancellation_WhereWhere() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); - var ys = xs.Where((int x, CancellationToken ct) => new ValueTask(x % 2 == 0)).Where((int x, CancellationToken ct) => new ValueTask(x > 5)); + var ys = xs.WhereAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x % 2 == 0)).WhereAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x > 5)); var e = ys.GetAsyncEnumerator(); await HasNextAsync(e, 8); await HasNextAsync(e, 6); @@ -350,19 +348,19 @@ public async Task Where_Async_Cancel_WhereWhere() } [Fact] - public async Task Where_Async_Cancel_SequenceIdentity() + public async Task WhereAwaitWithCancellation_SequenceIdentity() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); - var ys = xs.Where((int x, CancellationToken ct) => new ValueTask(x % 2 == 0)); + var ys = xs.WhereAwaitWithCancellation((int x, CancellationToken ct) => new ValueTask(x % 2 == 0)); await SequenceIdentity(ys); } [Fact] - public async Task Where_Async_Cancel_Indexed_SequenceIdentity() + public async Task WhereAwaitWithCancellation_Indexed_SequenceIdentity() { var xs = new[] { 8, 5, 7, 4, 6, 9, 2, 1, 0 }.ToAsyncEnumerable(); - var ys = xs.Where((x, i, ct) => new ValueTask(i % 2 == 0)); + var ys = xs.WhereAwaitWithCancellation((x, i, ct) => new ValueTask(i % 2 == 0)); await SequenceIdentity(ys); } diff --git a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj index 59613ea86f..53e0269662 100644 --- a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj +++ b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj @@ -73,4 +73,8 @@ + + + + diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs index bd2680a526..d2dab5cc1a 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs @@ -40,7 +40,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AggregateAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -71,7 +71,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AggregateAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -124,7 +124,7 @@ static async ValueTask Core(IAsyncEnumerable _source, TAcc } } - public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -147,7 +147,7 @@ static async ValueTask Core(IAsyncEnumerable _source, TAcc } #if !NO_DEEP_CANCELLATION - public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitWithCancellationAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -194,7 +194,7 @@ static async ValueTask Core(IAsyncEnumerable _source, TAccumul } } - public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -219,7 +219,7 @@ static async ValueTask Core(IAsyncEnumerable _source, TAccumul } #if !NO_DEEP_CANCELLATION - public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) + public static ValueTask AggregateAwaitWithCancellationAsync(this IAsyncEnumerable source, TAccumulate seed, Func> accumulator, Func> resultSelector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs index 10d5591ab0..46041173f8 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs @@ -33,7 +33,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AllAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask AllAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -57,7 +57,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AllAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask AllAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs index cad05f66aa..550581f028 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs @@ -49,7 +49,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AnyAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask AnyAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -73,7 +73,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AnyAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask AnyAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs index 2791bf78f5..d6aa470397 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs @@ -76,7 +76,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -111,7 +111,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -212,7 +212,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -247,7 +247,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -348,7 +348,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -383,7 +383,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -484,7 +484,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -519,7 +519,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -620,7 +620,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -655,7 +655,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -772,7 +772,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -815,7 +815,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -940,7 +940,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -983,7 +983,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1108,7 +1108,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1151,7 +1151,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1276,7 +1276,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1319,7 +1319,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1444,7 +1444,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1487,7 +1487,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt index 38b3a28aa0..e7a0ef8393 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt @@ -191,7 +191,7 @@ else } } - public static ValueTask<<#=o.res#>> AverageAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + public static ValueTask<<#=o.res#>> AverageAwaitAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -266,7 +266,7 @@ else } #if !NO_DEEP_CANCELLATION - public static ValueTask<<#=o.res#>> AverageAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + public static ValueTask<<#=o.res#>> AverageAwaitWithCancellationAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs index 55da75f217..f0ac22ddf9 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs @@ -72,7 +72,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func CountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask CountAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -101,7 +101,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func CountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask CountAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs index b4fd9cf07a..98f06c9f95 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs @@ -42,7 +42,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func FirstAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask FirstAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -60,7 +60,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func FirstAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask FirstAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs index beda3cd221..2869761cb7 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs @@ -42,7 +42,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func FirstOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask FirstOrDefaultAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -60,7 +60,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func FirstOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask FirstOrDefaultAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs index f2be60a6cc..8e68b35990 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs @@ -55,7 +55,7 @@ static async Task Core(IAsyncEnumerable _source, Action _ } } - public static Task ForEachAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + public static Task ForEachAwaitAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -73,7 +73,7 @@ static async Task Core(IAsyncEnumerable _source, Func _a } } - public static Task ForEachAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) + public static Task ForEachAwaitWithCancellationAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -91,7 +91,7 @@ static async Task Core(IAsyncEnumerable _source, Func(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + public static Task ForEachAwaitAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -111,7 +111,7 @@ static async Task Core(IAsyncEnumerable _source, Func(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) + public static Task ForEachAwaitWithCancellationAsync(this IAsyncEnumerable source, Func action, CancellationToken cancellationToken) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs index 4fa54a5c7b..c4477ce4d0 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs @@ -16,17 +16,17 @@ public static IAsyncEnumerable> GroupBy> GroupBy(this IAsyncEnumerable source, Func keySelector, IEqualityComparer comparer) => new GroupedAsyncEnumerable(source, keySelector, comparer); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector) => + public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector) => new GroupedAsyncEnumerableWithTask(source, keySelector, comparer: null); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => + public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => new GroupedAsyncEnumerableWithTask(source, keySelector, comparer); #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector) => + public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => + public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer); #endif @@ -36,17 +36,17 @@ public static IAsyncEnumerable> GroupBy> GroupBy(this IAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer comparer) => new GroupedAsyncEnumerable(source, keySelector, elementSelector, comparer); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => + public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => new GroupedAsyncEnumerableWithTask(source, keySelector, elementSelector, comparer: null); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => + public static IAsyncEnumerable> GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => new GroupedAsyncEnumerableWithTask(source, keySelector, elementSelector, comparer); #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => + public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, comparer: null); - public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => + public static IAsyncEnumerable> GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer) => new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, comparer); #endif @@ -56,17 +56,17 @@ public static IAsyncEnumerable GroupBy(this IAs public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func keySelector, Func, TResult> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerable(source, keySelector, resultSelector, comparer); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector) => + public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => + public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, resultSelector, comparer); #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector) => + public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => + public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, resultSelector, comparer); #endif @@ -76,17 +76,17 @@ public static IAsyncEnumerable GroupBy GroupBy(this IAsyncEnumerable source, Func keySelector, Func elementSelector, Func, TResult> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerable(source, keySelector, elementSelector, resultSelector, comparer); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector) => + public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, elementSelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => + public static IAsyncEnumerable GroupByAwait(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerableWithTask(source, keySelector, elementSelector, resultSelector, comparer); #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector) => + public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupBy(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => + public static IAsyncEnumerable GroupByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) => new GroupedResultAsyncEnumerableWithTaskAndCancellation(source, keySelector, elementSelector, resultSelector, comparer); #endif @@ -220,7 +220,7 @@ protected override async ValueTask MoveNextCore() { case AsyncIteratorState.Allocated: _lookup = await Internal.LookupWithTask.CreateAsync(_source, _keySelector, _comparer, _cancellationToken).ConfigureAwait(false); - _enumerator = _lookup.Select(async g => await _resultSelector(g.Key, g).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? + _enumerator = _lookup.SelectAwait(async g => await _resultSelector(g.Key, g).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? _state = AsyncIteratorState.Iterating; goto case AsyncIteratorState.Iterating; @@ -310,7 +310,7 @@ protected override async ValueTask MoveNextCore() { case AsyncIteratorState.Allocated: _lookup = await Internal.LookupWithTask.CreateAsync(_source, _keySelector, _comparer, _cancellationToken).ConfigureAwait(false); - _enumerator = _lookup.Select(async g => await _resultSelector(g.Key, g, _cancellationToken).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? + _enumerator = _lookup.SelectAwait(async g => await _resultSelector(g.Key, g, _cancellationToken).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? _state = AsyncIteratorState.Iterating; goto case AsyncIteratorState.Iterating; @@ -493,7 +493,7 @@ protected override async ValueTask MoveNextCore() { case AsyncIteratorState.Allocated: _lookup = await Internal.LookupWithTask.CreateAsync(_source, _keySelector, _elementSelector, _comparer, _cancellationToken).ConfigureAwait(false); - _enumerator = _lookup.Select(async g => await _resultSelector(g.Key, g).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? + _enumerator = _lookup.SelectAwait(async g => await _resultSelector(g.Key, g).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? _state = AsyncIteratorState.Iterating; goto case AsyncIteratorState.Iterating; @@ -585,7 +585,7 @@ protected override async ValueTask MoveNextCore() { case AsyncIteratorState.Allocated: _lookup = await Internal.LookupWithTask.CreateAsync(_source, _keySelector, _elementSelector, _comparer, _cancellationToken).ConfigureAwait(false); - _enumerator = _lookup.Select(async g => await _resultSelector(g.Key, g, _cancellationToken).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? + _enumerator = _lookup.SelectAwait(async g => await _resultSelector(g.Key, g, _cancellationToken).ConfigureAwait(false)).GetAsyncEnumerator(_cancellationToken); // REVIEW: Introduce another ApplyResultSelector? _state = AsyncIteratorState.Iterating; goto case AsyncIteratorState.Iterating; diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs index 7ff5a73d5e..c9415468ae 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs @@ -52,10 +52,10 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector) => - GroupJoin(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); + public static IAsyncEnumerable GroupJoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector) => + GroupJoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) + public static IAsyncEnumerable GroupJoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, ValueTask> resultSelector, IEqualityComparer comparer) { if (outer == null) throw Error.ArgumentNull(nameof(outer)); @@ -95,10 +95,10 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector) => - GroupJoin(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); + public static IAsyncEnumerable GroupJoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector) => + GroupJoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); - public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) + public static IAsyncEnumerable GroupJoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func, CancellationToken, ValueTask> resultSelector, IEqualityComparer comparer) { if (outer == null) throw Error.ArgumentNull(nameof(outer)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs index ad2f454330..b00948e7b8 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs @@ -69,10 +69,10 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => - Join(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); + public static IAsyncEnumerable JoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => + JoinAwait(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); - public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) + public static IAsyncEnumerable JoinAwait(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) { if (outer == null) throw Error.ArgumentNull(nameof(outer)); @@ -128,10 +128,10 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => - Join(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); + public static IAsyncEnumerable JoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector) => + JoinAwaitWithCancellation(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); - public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) + public static IAsyncEnumerable JoinAwaitWithCancellation(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func> outerKeySelector, Func> innerKeySelector, Func> resultSelector, IEqualityComparer comparer) { if (outer == null) throw Error.ArgumentNull(nameof(outer)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs index 9ea5c3f1ae..45e1d101b9 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs @@ -42,7 +42,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LastAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask LastAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -60,7 +60,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LastAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask LastAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs index 456fa982f1..cf8b15e19f 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs @@ -42,7 +42,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LastOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask LastOrDefaultAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -60,7 +60,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LastOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask LastOrDefaultAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs index 90d7cc681a..3a7134e022 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs @@ -61,7 +61,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LongCountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask LongCountAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -90,7 +90,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func LongCountAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask LongCountAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs index 97b6a3d763..4d61d9f082 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs @@ -164,7 +164,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -244,7 +244,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs index b90382fbb7..9a7889e8ed 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs @@ -166,7 +166,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -246,7 +246,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs index 748a6f3c36..c8770a7e2d 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs @@ -80,7 +80,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -117,7 +117,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -302,7 +302,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -378,7 +378,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -524,7 +524,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -561,7 +561,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -746,7 +746,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -822,7 +822,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -998,7 +998,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1050,7 +1050,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1242,7 +1242,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1314,7 +1314,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1486,7 +1486,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1538,7 +1538,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1730,7 +1730,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1802,7 +1802,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1944,7 +1944,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -1981,7 +1981,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2114,7 +2114,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2164,7 +2164,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MaxAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MaxAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2284,7 +2284,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2321,7 +2321,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2458,7 +2458,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2510,7 +2510,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2632,7 +2632,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2669,7 +2669,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2806,7 +2806,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -2858,7 +2858,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3012,7 +3012,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3065,7 +3065,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3250,7 +3250,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3318,7 +3318,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3488,7 +3488,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3541,7 +3541,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3726,7 +3726,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3794,7 +3794,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3932,7 +3932,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -3969,7 +3969,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -4102,7 +4102,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -4152,7 +4152,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func MinAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask MinAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt index 919cf5c721..6022691633 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt @@ -285,15 +285,17 @@ foreach (var overload in new[] { }) { var isDeepCancellation = overload.selector.Contains("CancellationToken"); + var suffix = overload.invoke.StartsWith("await") ? "Await" : ""; if (isDeepCancellation) { + suffix += "WithCancellation"; #> #if !NO_DEEP_CANCELLATION <# } #> - public static ValueTask<<#=t#>> <#=m#>Async(this IAsyncEnumerable source, <#=overload.selector#> selector, CancellationToken cancellationToken = default) + public static ValueTask<<#=t#>> <#=m#><#=suffix#>Async(this IAsyncEnumerable source, <#=overload.selector#> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs index eff7657af9..34d2e8dd6c 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs @@ -13,44 +13,44 @@ public static partial class AsyncEnumerable public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func keySelector) => new OrderedAsyncEnumerable(source, keySelector, comparer: null, descending: false, parent: null); - public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector) => + public static IOrderedAsyncEnumerable OrderByAwait(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer: null, descending: false, parent: null); #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector) => + public static IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null, descending: false, parent: null); #endif public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func keySelector, IComparer comparer) => new OrderedAsyncEnumerable(source, keySelector, comparer, descending: false, parent: null); - public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => + public static IOrderedAsyncEnumerable OrderByAwait(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer, descending: false, parent: null); #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => + public static IOrderedAsyncEnumerable OrderByAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer, descending: false, parent: null); #endif public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func keySelector) => new OrderedAsyncEnumerable(source, keySelector, comparer: null, descending: true, parent: null); - public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector) => + public static IOrderedAsyncEnumerable OrderByDescendingAwait(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer: null, descending: true, parent: null); #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector) => + public static IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null, descending: true, parent: null); #endif public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func keySelector, IComparer comparer) => new OrderedAsyncEnumerable(source, keySelector, comparer, descending: true, parent: null); - public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => + public static IOrderedAsyncEnumerable OrderByDescendingAwait(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTask(source, keySelector, comparer, descending: true, parent: null); #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => + public static IOrderedAsyncEnumerable OrderByDescendingAwaitWithCancellation(this IAsyncEnumerable source, Func> keySelector, IComparer comparer) => new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer, descending: true, parent: null); #endif @@ -62,7 +62,7 @@ public static IOrderedAsyncEnumerable ThenBy(this IOrder return source.CreateOrderedEnumerable(keySelector, comparer: null, descending: false); } - public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector) + public static IOrderedAsyncEnumerable ThenByAwait(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -71,7 +71,7 @@ public static IOrderedAsyncEnumerable ThenBy(this IOrder } #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector) + public static IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -88,7 +88,7 @@ public static IOrderedAsyncEnumerable ThenBy(this IOrder return source.CreateOrderedEnumerable(keySelector, comparer, descending: false); } - public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + public static IOrderedAsyncEnumerable ThenByAwait(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -97,7 +97,7 @@ public static IOrderedAsyncEnumerable ThenBy(this IOrder } #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + public static IOrderedAsyncEnumerable ThenByAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -114,7 +114,7 @@ public static IOrderedAsyncEnumerable ThenByDescending(t return source.CreateOrderedEnumerable(keySelector, comparer: null, descending: true); } - public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector) + public static IOrderedAsyncEnumerable ThenByDescendingAwait(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -123,7 +123,7 @@ public static IOrderedAsyncEnumerable ThenByDescending(t } #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector) + public static IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -140,7 +140,7 @@ public static IOrderedAsyncEnumerable ThenByDescending(t return source.CreateOrderedEnumerable(keySelector, comparer, descending: true); } - public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + public static IOrderedAsyncEnumerable ThenByDescendingAwait(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -149,7 +149,7 @@ public static IOrderedAsyncEnumerable ThenByDescending(t } #if !NO_DEEP_CANCELLATION - public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) + public static IOrderedAsyncEnumerable ThenByDescendingAwaitWithCancellation(this IOrderedAsyncEnumerable source, Func> keySelector, IComparer comparer) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs index bacd4d572c..b84d1edc73 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs @@ -58,7 +58,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) + public static IAsyncEnumerable SelectAwait(this IAsyncEnumerable source, Func> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -77,7 +77,7 @@ public static IAsyncEnumerable Select(this IAsyncEnum } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) + public static IAsyncEnumerable SelectAwaitWithCancellation(this IAsyncEnumerable source, Func> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -96,7 +96,7 @@ public static IAsyncEnumerable Select(this IAsyncEnum } #endif - public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) + public static IAsyncEnumerable SelectAwait(this IAsyncEnumerable source, Func> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -126,7 +126,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func> selector) + public static IAsyncEnumerable SelectAwaitWithCancellation(this IAsyncEnumerable source, Func> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs index 9c60a7c046..eb209f270c 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs @@ -23,7 +23,7 @@ public static IAsyncEnumerable SelectMany(this IAsync // REVIEW: Should we keep these overloads that return ValueTask>? One could argue the selector is async twice. - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) + public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -34,7 +34,7 @@ public static IAsyncEnumerable SelectMany(this IAsync } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) + public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -79,7 +79,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) + public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -114,7 +114,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> selector) + public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> selector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -178,7 +178,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -208,7 +208,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -274,7 +274,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + public static IAsyncEnumerable SelectManyAwait(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -311,7 +311,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) + public static IAsyncEnumerable SelectManyAwaitWithCancellation(this IAsyncEnumerable source, Func>> collectionSelector, Func> resultSelector) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs index f248d45a33..609ed5885a 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs @@ -85,7 +85,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SingleAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask SingleAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -122,7 +122,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SingleAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask SingleAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs index ae68be83c0..b5ac28f153 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs @@ -85,7 +85,7 @@ async ValueTask Core(IAsyncEnumerable _source, Func SingleOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask SingleOrDefaultAwaitAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -122,7 +122,7 @@ async ValueTask Core(IAsyncEnumerable _source, Func SingleOrDefaultAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) + public static ValueTask SingleOrDefaultAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> predicate, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs index d32af56f85..46b968a06f 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs @@ -92,7 +92,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable SkipWhileAwait(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -130,7 +130,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable SkipWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -168,7 +168,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #endif - public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable SkipWhileAwait(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -213,7 +213,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable SkipWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs index 5b3737da57..bb0f4da0d8 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs @@ -60,7 +60,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -88,7 +88,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -166,7 +166,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -194,7 +194,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -266,7 +266,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -291,7 +291,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -360,7 +360,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -385,7 +385,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -454,7 +454,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -479,7 +479,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -554,7 +554,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -582,7 +582,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -660,7 +660,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -688,7 +688,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -760,7 +760,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -785,7 +785,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -854,7 +854,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -879,7 +879,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -948,7 +948,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -973,7 +973,7 @@ static async ValueTask Core(IAsyncEnumerable _source, Func SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) + public static ValueTask SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt index 89801302cd..8233e40832 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt @@ -111,7 +111,7 @@ else } } - public static ValueTask<<#=o.type#>> SumAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + public static ValueTask<<#=o.type#>> SumAwaitAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -152,7 +152,7 @@ else } #if !NO_DEEP_CANCELLATION - public static ValueTask<<#=o.type#>> SumAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) + public static ValueTask<<#=o.type#>> SumAwaitWithCancellationAsync(this IAsyncEnumerable source, Func>> selector, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs index 8c346f0da0..9ddd1a2c31 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs @@ -72,7 +72,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable TakeWhileAwait(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -100,7 +100,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable TakeWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -128,7 +128,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #endif - public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable TakeWhileAwait(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -163,7 +163,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable TakeWhileAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs index 9b330ac649..f91dc4fea1 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs @@ -37,10 +37,10 @@ static async ValueTask> Core(IAsyncEnumerable } } - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => - ToDictionaryAsync(source, keySelector, comparer: null, cancellationToken); + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => + ToDictionaryAwaitAsync(source, keySelector, comparer: null, cancellationToken); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -65,10 +65,10 @@ static async ValueTask> Core(IAsyncEnumerable } #if !NO_DEEP_CANCELLATION - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => - ToDictionaryAsync(source, keySelector, comparer: null, cancellationToken); + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => + ToDictionaryAwaitWithCancellationAsync(source, keySelector, comparer: null, cancellationToken); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -123,10 +123,10 @@ static async ValueTask> Core(IAsyncEnumerable> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => - ToDictionaryAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => + ToDictionaryAwaitAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -154,10 +154,10 @@ static async ValueTask> Core(IAsyncEnumerable> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => - ToDictionaryAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => + ToDictionaryAwaitWithCancellationAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); - public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToDictionaryAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs index ffb5c0f848..eaa65d9690 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs @@ -28,10 +28,10 @@ static async ValueTask> Core(IAsyncEnumerable _s } } - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => - ToLookupAsync(source, keySelector, comparer:null, cancellationToken); + public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => + ToLookupAwaitAsync(source, keySelector, comparer:null, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -47,10 +47,10 @@ async ValueTask> Core(IAsyncEnumerable _source, } #if !NO_DEEP_CANCELLATION - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => - ToLookupAsync(source, keySelector, comparer: null, cancellationToken); + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, CancellationToken cancellationToken = default) => + ToLookupAwaitWithCancellationAsync(source, keySelector, comparer: null, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -86,10 +86,10 @@ static async ValueTask> Core(IAsyncEnumerable _ } } - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => - ToLookupAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); + public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => + ToLookupAwaitAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -107,10 +107,10 @@ static async ValueTask> Core(IAsyncEnumerable _ } #if !NO_DEEP_CANCELLATION - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => - ToLookupAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, CancellationToken cancellationToken = default) => + ToLookupAwaitWithCancellationAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); - public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) + public static ValueTask> ToLookupAwaitWithCancellationAsync(this IAsyncEnumerable source, Func> keySelector, Func> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken = default) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs index b78098a68d..2c307bd2d3 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs @@ -59,7 +59,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable WhereAwait(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -76,7 +76,7 @@ public static IAsyncEnumerable Where(this IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable WhereAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -93,7 +93,7 @@ public static IAsyncEnumerable Where(this IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable WhereAwait(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); @@ -126,7 +126,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func> predicate) + public static IAsyncEnumerable WhereAwaitWithCancellation(this IAsyncEnumerable source, Func> predicate) { if (source == null) throw Error.ArgumentNull(nameof(source)); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs index 01984ae609..827a4b3042 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs @@ -41,7 +41,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) #endif } - public static IAsyncEnumerable Zip(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) + public static IAsyncEnumerable ZipAwait(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) { if (first == null) throw Error.ArgumentNull(nameof(first)); @@ -72,7 +72,7 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } #if !NO_DEEP_CANCELLATION - public static IAsyncEnumerable Zip(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) + public static IAsyncEnumerable ZipAwaitWithCancellation(this IAsyncEnumerable first, IAsyncEnumerable second, Func> selector) { if (first == null) throw Error.ArgumentNull(nameof(first));