// 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.Collections.Generic; using System.Linq.Expressions; using System.Reflection; using System.Threading; using System.Threading.Tasks; namespace System.Linq { public static partial class AsyncQueryable { public static Task Aggregate(this IAsyncQueryable source, Expression> accumulator) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Aggregate(default(IAsyncQueryable), default(Expression>))), source.Expression, accumulator), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, accumulator), CancellationToken.None); #endif } public static Task Aggregate(this IAsyncQueryable source, Expression>> accumulator) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Aggregate(default(IAsyncQueryable), default(Expression>>))), source.Expression, accumulator), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, accumulator), CancellationToken.None); #endif } public static Task Aggregate(this IAsyncQueryable source, Expression> accumulator, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Aggregate(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 Task Aggregate(this IAsyncQueryable source, Expression>> accumulator, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Aggregate(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 Task Aggregate(this IAsyncQueryable source, TAccumulate seed, Expression> accumulator) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Aggregate(default(IAsyncQueryable), default(TAccumulate), default(Expression>))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator), CancellationToken.None); #endif } public static Task Aggregate(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Aggregate(default(IAsyncQueryable), default(TAccumulate), default(Expression>>))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate)), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator), CancellationToken.None); #endif } public static Task Aggregate(this IAsyncQueryable source, TAccumulate seed, Expression> accumulator, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Aggregate(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 Task Aggregate(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (accumulator == null) throw new ArgumentNullException(nameof(accumulator)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Aggregate(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 Task Aggregate(this IAsyncQueryable source, TAccumulate seed, Expression> accumulator, Expression> resultSelector) { 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.Aggregate(default(IAsyncQueryable), default(TAccumulate), default(Expression>), default(Expression>))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector), CancellationToken.None); #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), CancellationToken.None); #endif } public static Task Aggregate(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator, Expression>> resultSelector) { 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.Aggregate(default(IAsyncQueryable), default(TAccumulate), default(Expression>>), default(Expression>>))), source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator, resultSelector), CancellationToken.None); #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), CancellationToken.None); #endif } public static Task Aggregate(this IAsyncQueryable source, TAccumulate seed, Expression> accumulator, Expression> resultSelector, CancellationToken cancellationToken) { 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.Aggregate(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 } public static Task Aggregate(this IAsyncQueryable source, TAccumulate seed, Expression>> accumulator, Expression>> resultSelector, CancellationToken cancellationToken) { 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.Aggregate(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 } public static Task All(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.All(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task All(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.All(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task All(this IAsyncQueryable source, Expression> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.All(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 Task All(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.All(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 Task Any(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Any(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task Any(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Any(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task Any(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Any(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task Any(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Any(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Any(this IAsyncQueryable source, Expression> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Any(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 Task Any(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Any(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 Append(this IAsyncQueryable source, TSource element) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Append(default(IAsyncQueryable), default(TSource))), source.Expression, Expression.Constant(element, typeof(TSource)))); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(element, typeof(TSource)))); #endif } public static Task Average(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Average(this IAsyncQueryable source, Expression> selector) { 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.Average(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, Expression>> selector) { 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.Average(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Average(this IAsyncQueryable source, Expression> selector) { 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.Average(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, Expression>> selector) { 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.Average(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Average(this IAsyncQueryable source, Expression> selector) { 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.Average(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, Expression>> selector) { 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.Average(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Average(this IAsyncQueryable source, Expression> selector) { 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.Average(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, Expression>> selector) { 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.Average(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Average(this IAsyncQueryable source, Expression> selector) { 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.Average(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, Expression>> selector) { 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.Average(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Average(this IAsyncQueryable source, Expression> selector) { 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.Average(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, Expression>> selector) { 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.Average(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Average(this IAsyncQueryable source, Expression> selector) { 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.Average(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, Expression>> selector) { 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.Average(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Average(this IAsyncQueryable source, Expression> selector) { 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.Average(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, Expression>> selector) { 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.Average(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Average(this IAsyncQueryable source, Expression> selector) { 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.Average(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, Expression>> selector) { 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.Average(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Average(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Average(this IAsyncQueryable source, Expression> selector) { 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.Average(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, Expression>> selector) { 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.Average(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Average(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Average(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 Task Average(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Average(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 IAsyncQueryable Cast(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Cast(default(IAsyncQueryable))), source.Expression)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), source.Expression)); #endif } public static IAsyncQueryable Concat(this IAsyncQueryable first, IAsyncEnumerable second) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); #if CRIPPLED_REFLECTION return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Concat(default(IAsyncQueryable), default(IAsyncEnumerable))), first.Expression, GetSourceExpression(second))); #else return first.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), first.Expression, GetSourceExpression(second))); #endif } public static Task Contains(this IAsyncQueryable source, TSource value) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Contains(default(IAsyncQueryable), default(TSource))), source.Expression, Expression.Constant(value, typeof(TSource))), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(value, typeof(TSource))), CancellationToken.None); #endif } public static Task Contains(this IAsyncQueryable source, TSource value, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Contains(default(IAsyncQueryable), default(TSource), default(CancellationToken))), source.Expression, Expression.Constant(value, typeof(TSource)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(value, typeof(TSource)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Contains(this IAsyncQueryable source, TSource value, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Contains(default(IAsyncQueryable), default(TSource), default(IEqualityComparer))), source.Expression, Expression.Constant(value, typeof(TSource)), Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(value, typeof(TSource)), Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #endif } public static Task Contains(this IAsyncQueryable source, TSource value, IEqualityComparer comparer, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Contains(default(IAsyncQueryable), default(TSource), default(IEqualityComparer), default(CancellationToken))), source.Expression, Expression.Constant(value, typeof(TSource)), Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(value, typeof(TSource)), Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Count(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Count(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task Count(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Count(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Count(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Count(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task Count(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Count(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task Count(this IAsyncQueryable source, Expression> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Count(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 Task Count(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Count(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 DefaultIfEmpty(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.DefaultIfEmpty(default(IAsyncQueryable))), source.Expression)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression)); #endif } public static IAsyncQueryable DefaultIfEmpty(this IAsyncQueryable source, TSource defaultValue) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.DefaultIfEmpty(default(IAsyncQueryable), default(TSource))), source.Expression, Expression.Constant(defaultValue, typeof(TSource)))); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(defaultValue, typeof(TSource)))); #endif } public static IAsyncQueryable Distinct(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Distinct(default(IAsyncQueryable))), source.Expression)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression)); #endif } public static IAsyncQueryable Distinct(this IAsyncQueryable source, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Distinct(default(IAsyncQueryable), default(IEqualityComparer))), source.Expression, Expression.Constant(comparer, typeof(IEqualityComparer)))); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } public static Task ElementAt(this IAsyncQueryable source, int index) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.ElementAt(default(IAsyncQueryable), default(int))), source.Expression, Expression.Constant(index, typeof(int))), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(index, typeof(int))), CancellationToken.None); #endif } public static Task ElementAt(this IAsyncQueryable source, int index, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.ElementAt(default(IAsyncQueryable), default(int), default(CancellationToken))), source.Expression, Expression.Constant(index, typeof(int)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(index, typeof(int)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task ElementAtOrDefault(this IAsyncQueryable source, int index) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.ElementAtOrDefault(default(IAsyncQueryable), default(int))), source.Expression, Expression.Constant(index, typeof(int))), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(index, typeof(int))), CancellationToken.None); #endif } public static Task ElementAtOrDefault(this IAsyncQueryable source, int index, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.ElementAtOrDefault(default(IAsyncQueryable), default(int), default(CancellationToken))), source.Expression, Expression.Constant(index, typeof(int)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(index, typeof(int)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static IAsyncQueryable Except(this IAsyncQueryable first, IAsyncEnumerable second) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); #if CRIPPLED_REFLECTION return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Except(default(IAsyncQueryable), default(IAsyncEnumerable))), first.Expression, GetSourceExpression(second))); #else return first.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), first.Expression, GetSourceExpression(second))); #endif } public static IAsyncQueryable Except(this IAsyncQueryable first, IAsyncEnumerable second, IEqualityComparer comparer) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Except(default(IAsyncQueryable), default(IAsyncEnumerable), default(IEqualityComparer))), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer)))); #else return first.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } public static Task First(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.First(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task First(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.First(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task First(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.First(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task First(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.First(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task First(this IAsyncQueryable source, Expression> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.First(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 Task First(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.First(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 Task FirstOrDefault(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstOrDefault(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task FirstOrDefault(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstOrDefault(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task FirstOrDefault(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstOrDefault(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task FirstOrDefault(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstOrDefault(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task FirstOrDefault(this IAsyncQueryable source, Expression> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstOrDefault(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 Task FirstOrDefault(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.FirstOrDefault(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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION 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, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #else 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, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #else 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) { 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)); #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>> 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(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, 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>), default(Expression, TResult>>))), 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, Task>> 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>>), default(Expression, Task>>))), 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, 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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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>> 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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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) { 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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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, Task>> 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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression, Task>>), 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, 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>), default(Expression, TResult>>))), 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)); #endif } public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, Expression, Task>> 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, Task>>))), 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)); #endif } public static IAsyncQueryable GroupBy(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, Expression, TResult>> 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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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 GroupBy(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, Expression, Task>> 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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupBy(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(Expression, Task>>), 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, TResult>> resultSelector) { if (outer == null) throw new ArgumentNullException(nameof(outer)); if (inner == null) throw new ArgumentNullException(nameof(inner)); if (outerKeySelector == null) throw new ArgumentNullException(nameof(outerKeySelector)); if (innerKeySelector == null) throw new ArgumentNullException(nameof(innerKeySelector)); if (resultSelector == null) 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)); #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, Task>> resultSelector) { if (outer == null) throw new ArgumentNullException(nameof(outer)); if (inner == null) throw new ArgumentNullException(nameof(inner)); if (outerKeySelector == null) throw new ArgumentNullException(nameof(outerKeySelector)); if (innerKeySelector == null) throw new ArgumentNullException(nameof(innerKeySelector)); if (resultSelector == null) 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, Task>>))), 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, IEqualityComparer comparer) { if (outer == null) throw new ArgumentNullException(nameof(outer)); if (inner == null) throw new ArgumentNullException(nameof(inner)); if (outerKeySelector == null) throw new ArgumentNullException(nameof(outerKeySelector)); if (innerKeySelector == null) throw new ArgumentNullException(nameof(innerKeySelector)); if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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, Task>> resultSelector, IEqualityComparer comparer) { if (outer == null) throw new ArgumentNullException(nameof(outer)); if (inner == null) throw new ArgumentNullException(nameof(inner)); if (outerKeySelector == null) throw new ArgumentNullException(nameof(outerKeySelector)); if (innerKeySelector == null) throw new ArgumentNullException(nameof(innerKeySelector)); if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return outer.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.GroupJoin(default(IAsyncQueryable), default(IAsyncEnumerable), default(Expression>>), default(Expression>>), default(Expression, Task>>), 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 Intersect(this IAsyncQueryable first, IAsyncEnumerable second) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); #if CRIPPLED_REFLECTION return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Intersect(default(IAsyncQueryable), default(IAsyncEnumerable))), first.Expression, GetSourceExpression(second))); #else return first.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), first.Expression, GetSourceExpression(second))); #endif } public static IAsyncQueryable Intersect(this IAsyncQueryable first, IAsyncEnumerable second, IEqualityComparer comparer) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Intersect(default(IAsyncQueryable), default(IAsyncEnumerable), default(IEqualityComparer))), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer)))); #else return first.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } public static IAsyncQueryable Join(this IAsyncQueryable outer, IAsyncEnumerable inner, Expression> outerKeySelector, Expression> innerKeySelector, Expression> resultSelector) { if (outer == null) throw new ArgumentNullException(nameof(outer)); if (inner == null) throw new ArgumentNullException(nameof(inner)); if (outerKeySelector == null) throw new ArgumentNullException(nameof(outerKeySelector)); if (innerKeySelector == null) throw new ArgumentNullException(nameof(innerKeySelector)); if (resultSelector == null) 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)); #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) { if (outer == null) throw new ArgumentNullException(nameof(outer)); if (inner == null) throw new ArgumentNullException(nameof(inner)); if (outerKeySelector == null) throw new ArgumentNullException(nameof(outerKeySelector)); if (innerKeySelector == null) throw new ArgumentNullException(nameof(innerKeySelector)); if (resultSelector == null) 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)); #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) { if (outer == null) throw new ArgumentNullException(nameof(outer)); if (inner == null) throw new ArgumentNullException(nameof(inner)); if (outerKeySelector == null) throw new ArgumentNullException(nameof(outerKeySelector)); if (innerKeySelector == null) throw new ArgumentNullException(nameof(innerKeySelector)); if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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) { if (outer == null) throw new ArgumentNullException(nameof(outer)); if (inner == null) throw new ArgumentNullException(nameof(inner)); if (outerKeySelector == null) throw new ArgumentNullException(nameof(outerKeySelector)); if (innerKeySelector == null) throw new ArgumentNullException(nameof(innerKeySelector)); if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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 Task Last(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Last(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task Last(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Last(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Last(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Last(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task Last(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Last(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task Last(this IAsyncQueryable source, Expression> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Last(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 Task Last(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Last(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 Task LastOrDefault(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastOrDefault(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task LastOrDefault(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastOrDefault(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task LastOrDefault(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastOrDefault(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task LastOrDefault(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastOrDefault(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task LastOrDefault(this IAsyncQueryable source, Expression> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastOrDefault(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 Task LastOrDefault(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LastOrDefault(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 Task LongCount(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LongCount(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task LongCount(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LongCount(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task LongCount(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LongCount(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task LongCount(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LongCount(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task LongCount(this IAsyncQueryable source, Expression> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LongCount(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 Task LongCount(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.LongCount(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 Task Max(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector) { 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.Max(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector) { 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.Max(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector) { 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.Max(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector) { 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.Max(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector) { 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.Max(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector) { 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.Max(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector) { 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.Max(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(IComparer))), source.Expression, Expression.Constant(comparer, typeof(IComparer))), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IComparer))), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector) { 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.Max(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector) { 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.Max(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector) { 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.Max(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector) { 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.Max(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector) { 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.Max(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector) { 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.Max(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector) { 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.Max(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector) { 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.Max(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector) { 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.Max(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector) { 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.Max(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector) { 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.Max(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector) { 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.Max(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector) { 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.Max(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector) { 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.Max(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector) { 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.Max(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Max(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, IComparer comparer, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Max(default(IAsyncQueryable), default(IComparer), default(CancellationToken))), source.Expression, Expression.Constant(comparer, typeof(IComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Max(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Max(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 Task Max(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Max(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 Task Min(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression>> selector) { 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.Min(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector) { 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.Min(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression>> selector) { 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.Min(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector) { 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.Min(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression>> selector) { 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.Min(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector) { 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.Min(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression>> selector) { 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.Min(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector) { 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.Min(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression>> selector) { 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.Min(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector) { 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.Min(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression>> selector) { 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.Min(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector) { 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.Min(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression>> selector) { 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.Min(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector) { 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.Min(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression>> selector) { 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.Min(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector) { 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.Min(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression>> selector) { 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.Min(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector) { 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.Min(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression>> selector) { 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.Min(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector) { 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.Min(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(IComparer))), source.Expression, Expression.Constant(comparer, typeof(IComparer))), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IComparer))), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector) { 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.Min(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression>> selector) { 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.Min(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), source.Expression, selector), CancellationToken.None); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, IComparer comparer, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Min(default(IAsyncQueryable), default(IComparer), default(CancellationToken))), source.Expression, Expression.Constant(comparer, typeof(IComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(comparer, typeof(IComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Min(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Min(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 Task Min(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Min(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 IAsyncQueryable OfType(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.OfType(default(IAsyncQueryable))), source.Expression)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TType)), source.Expression)); #endif } public static IOrderedAsyncQueryable OrderBy(this IAsyncQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) 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)); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) 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)); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) 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)); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) 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)); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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 IAsyncQueryable Prepend(this IAsyncQueryable source, TSource element) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Prepend(default(IAsyncQueryable), default(TSource))), source.Expression, Expression.Constant(element, typeof(TSource)))); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(element, typeof(TSource)))); #endif } public static IAsyncQueryable Repeat(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Repeat(default(IAsyncQueryable))), source.Expression)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression)); #endif } public static IAsyncQueryable Repeat(this IAsyncQueryable source, int count) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Repeat(default(IAsyncQueryable), default(int))), source.Expression, Expression.Constant(count, typeof(int)))); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int)))); #endif } public static IAsyncQueryable Reverse(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Reverse(default(IAsyncQueryable))), source.Expression)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression)); #endif } public static IAsyncQueryable Select(this IAsyncQueryable source, Expression> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION 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 SelectMany(this IAsyncQueryable source, Expression>> selector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); #if CRIPPLED_REFLECTION 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, Expression> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); if (resultSelector == null) 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, selector, resultSelector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, selector, resultSelector)); #endif } public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>>> selector, Expression>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); if (resultSelector == null) 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, selector, resultSelector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, selector, resultSelector)); #endif } public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>> selector, Expression> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); if (resultSelector == null) 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, selector, resultSelector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, selector, resultSelector)); #endif } public static IAsyncQueryable SelectMany(this IAsyncQueryable source, Expression>>> selector, Expression>> resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (selector == null) throw new ArgumentNullException(nameof(selector)); if (resultSelector == null) 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, selector, resultSelector)); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TCollection), typeof(TResult)), source.Expression, selector, resultSelector)); #endif } public static Task SequenceEqual(this IAsyncQueryable first, IAsyncEnumerable second) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); #if CRIPPLED_REFLECTION return first.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SequenceEqual(default(IAsyncQueryable), default(IAsyncEnumerable))), first.Expression, GetSourceExpression(second)), CancellationToken.None); #else return first.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), first.Expression, GetSourceExpression(second)), CancellationToken.None); #endif } public static Task SequenceEqual(this IAsyncQueryable first, IAsyncEnumerable second, IEqualityComparer comparer) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return first.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SequenceEqual(default(IAsyncQueryable), default(IAsyncEnumerable), default(IEqualityComparer))), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #else return first.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #endif } public static Task SequenceEqual(this IAsyncQueryable first, IAsyncEnumerable second, CancellationToken cancellationToken) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); #if CRIPPLED_REFLECTION return first.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SequenceEqual(default(IAsyncQueryable), default(IAsyncEnumerable), default(CancellationToken))), first.Expression, GetSourceExpression(second), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return first.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), first.Expression, GetSourceExpression(second), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task SequenceEqual(this IAsyncQueryable first, IAsyncEnumerable second, IEqualityComparer comparer, CancellationToken cancellationToken) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return first.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SequenceEqual(default(IAsyncQueryable), default(IAsyncEnumerable), default(IEqualityComparer), default(CancellationToken))), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return first.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer)), Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Single(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Single(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task Single(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Single(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Single(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Single(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task Single(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Single(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task Single(this IAsyncQueryable source, Expression> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Single(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 Task Single(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Single(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 Task SingleOrDefault(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleOrDefault(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task SingleOrDefault(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleOrDefault(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task SingleOrDefault(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleOrDefault(default(IAsyncQueryable), default(Expression>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task SingleOrDefault(this IAsyncQueryable source, Expression>> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleOrDefault(default(IAsyncQueryable), default(Expression>>))), source.Expression, predicate), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, predicate), CancellationToken.None); #endif } public static Task SingleOrDefault(this IAsyncQueryable source, Expression> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleOrDefault(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 Task SingleOrDefault(this IAsyncQueryable source, Expression>> predicate, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.SingleOrDefault(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 Skip(this IAsyncQueryable source, int count) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Skip(default(IAsyncQueryable), default(int))), source.Expression, Expression.Constant(count, typeof(int)))); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int)))); #endif } public static IAsyncQueryable SkipLast(this IAsyncQueryable source, int count) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.SkipLast(default(IAsyncQueryable), default(int))), source.Expression, Expression.Constant(count, typeof(int)))); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int)))); #endif } public static IAsyncQueryable SkipWhile(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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 Task Sum(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Sum(this IAsyncQueryable source, Expression> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, Expression>> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Sum(this IAsyncQueryable source, Expression> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, Expression>> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Sum(this IAsyncQueryable source, Expression> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, Expression>> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Sum(this IAsyncQueryable source, Expression> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, Expression>> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Sum(this IAsyncQueryable source, Expression> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, Expression>> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Sum(this IAsyncQueryable source, Expression> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, Expression>> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Sum(this IAsyncQueryable source, Expression> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, Expression>> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Sum(this IAsyncQueryable source, Expression> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, Expression>> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Sum(this IAsyncQueryable source, Expression> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, Expression>> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.Sum(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call((MethodInfo)MethodBase.GetCurrentMethod(), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task Sum(this IAsyncQueryable source, Expression> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, Expression>> selector) { 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.Sum(default(IAsyncQueryable), default(Expression>>))), source.Expression, selector), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, selector), CancellationToken.None); #endif } public static Task Sum(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression>> selector, CancellationToken cancellationToken) { 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.Sum(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 Task Sum(this IAsyncQueryable source, Expression> selector, CancellationToken cancellationToken) { 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.Sum(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 IAsyncQueryable Take(this IAsyncQueryable source, int count) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Take(default(IAsyncQueryable), default(int))), source.Expression, Expression.Constant(count, typeof(int)))); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int)))); #endif } public static IAsyncQueryable TakeLast(this IAsyncQueryable source, int count) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.TakeLast(default(IAsyncQueryable), default(int))), source.Expression, Expression.Constant(count, typeof(int)))); #else return source.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(count, typeof(int)))); #endif } public static IAsyncQueryable TakeWhile(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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 IOrderedAsyncQueryable ThenBy(this IOrderedAsyncQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) 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)); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) 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)); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) 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)); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) 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)); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #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)))); #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 Task ToArray(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.ToArray(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task ToArray(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync(Expression.Call(InfoOf(() => AsyncQueryable.ToArray(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task> ToDictionary(this IAsyncQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(default(IAsyncQueryable), default(Expression>))), source.Expression, keySelector), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector), CancellationToken.None); #endif } public static Task> ToDictionary(this IAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector), CancellationToken.None); #endif } public static Task> ToDictionary(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.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(default(IAsyncQueryable), default(Expression>), default(Expression>))), source.Expression, keySelector, elementSelector), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector), CancellationToken.None); #endif } public static Task> ToDictionary(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.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(default(IAsyncQueryable), default(Expression>>), default(Expression>>))), source.Expression, keySelector, elementSelector), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector), CancellationToken.None); #endif } public static Task> ToDictionary(this IAsyncQueryable source, Expression> keySelector, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(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 Task> ToDictionary(this IAsyncQueryable source, Expression>> keySelector, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(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 Task> ToDictionary(this IAsyncQueryable source, Expression> keySelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(default(IAsyncQueryable), default(Expression>), default(IEqualityComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #endif } public static Task> ToDictionary(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #endif } public static Task> ToDictionary(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(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 Task> ToDictionary(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, CancellationToken cancellationToken) { 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.ToDictionary(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 Task> ToDictionary(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, CancellationToken cancellationToken) { 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.ToDictionary(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 Task> ToDictionary(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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(default(IAsyncQueryable), default(Expression>), default(Expression>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #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))), CancellationToken.None); #endif } public static Task> ToDictionary(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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #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))), CancellationToken.None); #endif } public static Task> ToDictionary(this IAsyncQueryable source, Expression> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(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 Task> ToDictionary(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) { 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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(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 } public static Task> ToDictionary(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) { 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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToDictionary(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 } public static Task> ToList(this IAsyncQueryable source) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToList(default(IAsyncQueryable))), source.Expression), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression), CancellationToken.None); #endif } public static Task> ToList(this IAsyncQueryable source, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToList(default(IAsyncQueryable), default(CancellationToken))), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), source.Expression, Expression.Constant(cancellationToken, typeof(CancellationToken))), cancellationToken); #endif } public static Task> ToLookup(this IAsyncQueryable source, Expression> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(default(IAsyncQueryable), default(Expression>))), source.Expression, keySelector), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector), CancellationToken.None); #endif } public static Task> ToLookup(this IAsyncQueryable source, Expression>> keySelector) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(default(IAsyncQueryable), default(Expression>>))), source.Expression, keySelector), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector), CancellationToken.None); #endif } public static Task> ToLookup(this IAsyncQueryable source, Expression> keySelector, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(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 Task> ToLookup(this IAsyncQueryable source, Expression>> keySelector, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(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 Task> ToLookup(this IAsyncQueryable source, Expression> keySelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(default(IAsyncQueryable), default(Expression>), default(IEqualityComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #endif } public static Task> ToLookup(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(default(IAsyncQueryable), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #endif } public static Task> ToLookup(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.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(default(IAsyncQueryable), default(Expression>), default(Expression>))), source.Expression, keySelector, elementSelector), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector), CancellationToken.None); #endif } public static Task> ToLookup(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.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(default(IAsyncQueryable), default(Expression>>), default(Expression>>))), source.Expression, keySelector, elementSelector), CancellationToken.None); #else return source.Provider.ExecuteAsync>(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, keySelector, elementSelector), CancellationToken.None); #endif } public static Task> ToLookup(this IAsyncQueryable source, Expression> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(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 Task> ToLookup(this IAsyncQueryable source, Expression>> keySelector, IEqualityComparer comparer, CancellationToken cancellationToken) { if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(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 Task> ToLookup(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, CancellationToken cancellationToken) { 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.ToLookup(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 Task> ToLookup(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, CancellationToken cancellationToken) { 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.ToLookup(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 Task> ToLookup(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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(default(IAsyncQueryable), default(Expression>), default(Expression>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #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))), CancellationToken.None); #endif } public static Task> ToLookup(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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(default(IAsyncQueryable), default(Expression>>), default(Expression>>), default(IEqualityComparer))), source.Expression, keySelector, elementSelector, Expression.Constant(comparer, typeof(IEqualityComparer))), CancellationToken.None); #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))), CancellationToken.None); #endif } public static Task> ToLookup(this IAsyncQueryable source, Expression> keySelector, Expression> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) { 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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(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 } public static Task> ToLookup(this IAsyncQueryable source, Expression>> keySelector, Expression>> elementSelector, IEqualityComparer comparer, CancellationToken cancellationToken) { 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 (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return source.Provider.ExecuteAsync>(Expression.Call(InfoOf(() => AsyncQueryable.ToLookup(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 } public static IAsyncQueryable Union(this IAsyncQueryable first, IAsyncEnumerable second) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); #if CRIPPLED_REFLECTION return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Union(default(IAsyncQueryable), default(IAsyncEnumerable))), first.Expression, GetSourceExpression(second))); #else return first.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), first.Expression, GetSourceExpression(second))); #endif } public static IAsyncQueryable Union(this IAsyncQueryable first, IAsyncEnumerable second, IEqualityComparer comparer) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); if (comparer == null) throw new ArgumentNullException(nameof(comparer)); #if CRIPPLED_REFLECTION return first.Provider.CreateQuery(Expression.Call(InfoOf(() => AsyncQueryable.Union(default(IAsyncQueryable), default(IAsyncEnumerable), default(IEqualityComparer))), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer)))); #else return first.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), first.Expression, GetSourceExpression(second), Expression.Constant(comparer, typeof(IEqualityComparer)))); #endif } public static IAsyncQueryable Where(this IAsyncQueryable source, Expression> predicate) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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) { if (source == null) throw new ArgumentNullException(nameof(source)); if (predicate == null) throw new ArgumentNullException(nameof(predicate)); #if CRIPPLED_REFLECTION 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 Zip(this IAsyncQueryable first, IAsyncEnumerable second, Expression> selector) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); if (selector == null) 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)); #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) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); if (selector == null) 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)); #else return first.Provider.CreateQuery(Expression.Call(((MethodInfo)MethodBase.GetCurrentMethod()).MakeGenericMethod(typeof(TFirst), typeof(TSecond), typeof(TResult)), first.Expression, GetSourceExpression(second), selector)); #endif } } }