For NativeAOT compatibility, better speed.
Closes #79199
return EnumerableData().Select(array =>
{
var enumerable = (IEnumerable<int>)array[0];
- return new object[] { enumerable.AsQueryable(), array[1] };
+ return new[] { enumerable.AsQueryable(), array[1] };
});
}
}
<EnableAotAnalyzer>true</EnableAotAnalyzer>
</PropertyGroup>
<ItemGroup>
- <Compile Include="System\Linq\CachedReflection.cs" />
<Compile Include="System\Linq\EnumerableExecutor.cs" />
<Compile Include="System\Linq\EnumerableQuery.cs" />
<Compile Include="System\Linq\EnumerableRewriter.cs" />
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Linq.Expressions;
-using System.Reflection;
-
-namespace System.Linq
-{
- [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2060:MakeGenericMethod",
- Justification = "The methods passed into MakeGenericMethod do not contain trim annotations.")]
- internal static class CachedReflectionInfo
- {
- private static MethodInfo? s_Aggregate_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Aggregate_TSource_2(Type TSource) =>
- (s_Aggregate_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, object, object>>, object>(Queryable.Aggregate).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Aggregate_TSource_TAccumulate_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Aggregate_TSource_TAccumulate_3(Type TSource, Type TAccumulate) =>
- (s_Aggregate_TSource_TAccumulate_3 ??= new Func<IQueryable<object>, object, Expression<Func<object, object, object>>, object>(Queryable.Aggregate).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TAccumulate);
-
- private static MethodInfo? s_Aggregate_TSource_TAccumulate_TResult_4;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Aggregate_TSource_TAccumulate_TResult_4(Type TSource, Type TAccumulate, Type TResult) =>
- (s_Aggregate_TSource_TAccumulate_TResult_4 ??= new Func<IQueryable<object>, object, Expression<Func<object, object, object>>, Expression<Func<object, object>>, object>(Queryable.Aggregate).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TAccumulate, TResult);
-
- private static MethodInfo? s_All_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo All_TSource_2(Type TSource) =>
- (s_All_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, bool>(Queryable.All).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Any_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Any_TSource_1(Type TSource) =>
- (s_Any_TSource_1 ??= new Func<IQueryable<object>, bool>(Queryable.Any).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Any_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Any_TSource_2(Type TSource) =>
- (s_Any_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, bool>(Queryable.Any).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Average_Int32_1;
-
- public static MethodInfo Average_Int32_1 =>
- s_Average_Int32_1 ??= new Func<IQueryable<int>, double>(Queryable.Average).GetMethodInfo();
-
- private static MethodInfo? s_Average_NullableInt32_1;
-
- public static MethodInfo Average_NullableInt32_1 =>
- s_Average_NullableInt32_1 ??= new Func<IQueryable<int?>, double?>(Queryable.Average).GetMethodInfo();
-
- private static MethodInfo? s_Average_Int64_1;
-
- public static MethodInfo Average_Int64_1 =>
- s_Average_Int64_1 ??= new Func<IQueryable<long>, double>(Queryable.Average).GetMethodInfo();
-
- private static MethodInfo? s_Average_NullableInt64_1;
-
- public static MethodInfo Average_NullableInt64_1 =>
- s_Average_NullableInt64_1 ??= new Func<IQueryable<long?>, double?>(Queryable.Average).GetMethodInfo();
-
- private static MethodInfo? s_Average_Single_1;
-
- public static MethodInfo Average_Single_1 =>
- s_Average_Single_1 ??= new Func<IQueryable<float>, float>(Queryable.Average).GetMethodInfo();
-
- private static MethodInfo? s_Average_NullableSingle_1;
-
- public static MethodInfo Average_NullableSingle_1 =>
- s_Average_NullableSingle_1 ??= new Func<IQueryable<float?>, float?>(Queryable.Average).GetMethodInfo();
-
- private static MethodInfo? s_Average_Double_1;
-
- public static MethodInfo Average_Double_1 =>
- s_Average_Double_1 ??= new Func<IQueryable<double>, double>(Queryable.Average).GetMethodInfo();
-
- private static MethodInfo? s_Average_NullableDouble_1;
-
- public static MethodInfo Average_NullableDouble_1 =>
- s_Average_NullableDouble_1 ??= new Func<IQueryable<double?>, double?>(Queryable.Average).GetMethodInfo();
-
- private static MethodInfo? s_Average_Decimal_1;
-
- public static MethodInfo Average_Decimal_1 =>
- s_Average_Decimal_1 ??= new Func<IQueryable<decimal>, decimal>(Queryable.Average).GetMethodInfo();
-
- private static MethodInfo? s_Average_NullableDecimal_1;
-
- public static MethodInfo Average_NullableDecimal_1 =>
- s_Average_NullableDecimal_1 ??= new Func<IQueryable<decimal?>, decimal?>(Queryable.Average).GetMethodInfo();
-
- private static MethodInfo? s_Average_Int32_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Average_Int32_TSource_2(Type TSource) =>
- (s_Average_Int32_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, int>>, double>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Average_NullableInt32_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Average_NullableInt32_TSource_2(Type TSource) =>
- (s_Average_NullableInt32_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, int?>>, double?>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Average_Single_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Average_Single_TSource_2(Type TSource) =>
- (s_Average_Single_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, float>>, float>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Average_NullableSingle_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Average_NullableSingle_TSource_2(Type TSource) =>
- (s_Average_NullableSingle_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, float?>>, float?>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Average_Int64_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Average_Int64_TSource_2(Type TSource) =>
- (s_Average_Int64_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, long>>, double>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Average_NullableInt64_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Average_NullableInt64_TSource_2(Type TSource) =>
- (s_Average_NullableInt64_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, long?>>, double?>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Average_Double_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Average_Double_TSource_2(Type TSource) =>
- (s_Average_Double_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, double>>, double>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Average_NullableDouble_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Average_NullableDouble_TSource_2(Type TSource) =>
- (s_Average_NullableDouble_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, double?>>, double?>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Average_Decimal_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Average_Decimal_TSource_2(Type TSource) =>
- (s_Average_Decimal_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, decimal>>, decimal>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Average_NullableDecimal_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Average_NullableDecimal_TSource_2(Type TSource) =>
- (s_Average_NullableDecimal_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, decimal?>>, decimal?>(Queryable.Average).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Cast_TResult_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Cast_TResult_1(Type TResult) =>
- (s_Cast_TResult_1 ??= new Func<IQueryable, IQueryable<object>>(Queryable.Cast<object>).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TResult);
-
- private static MethodInfo? s_Chunk_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Chunk_TSource_1(Type TSource) =>
- (s_Chunk_TSource_1 ??= new Func<IQueryable<object>, int, IQueryable<object>>(Queryable.Chunk).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Concat_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Concat_TSource_2(Type TSource) =>
- (s_Concat_TSource_2 ??= new Func<IQueryable<object>, IEnumerable<object>, IQueryable<object>>(Queryable.Concat).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Contains_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Contains_TSource_2(Type TSource) =>
- (s_Contains_TSource_2 ??= new Func<IQueryable<object>, object, bool>(Queryable.Contains).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Contains_TSource_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Contains_TSource_3(Type TSource) =>
- (s_Contains_TSource_3 ??= new Func<IQueryable<object>, object, IEqualityComparer<object>, bool>(Queryable.Contains).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Count_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Count_TSource_1(Type TSource) =>
- (s_Count_TSource_1 ??= new Func<IQueryable<object>, int>(Queryable.Count).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Count_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Count_TSource_2(Type TSource) =>
- (s_Count_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, int>(Queryable.Count).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_DefaultIfEmpty_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo DefaultIfEmpty_TSource_1(Type TSource) =>
- (s_DefaultIfEmpty_TSource_1 ??= new Func<IQueryable<object>, IQueryable<object?>>(Queryable.DefaultIfEmpty).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_DefaultIfEmpty_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo DefaultIfEmpty_TSource_2(Type TSource) =>
- (s_DefaultIfEmpty_TSource_2 ??= new Func<IQueryable<object>, object, IQueryable<object?>>(Queryable.DefaultIfEmpty).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Distinct_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Distinct_TSource_1(Type TSource) =>
- (s_Distinct_TSource_1 ??= new Func<IQueryable<object>, IQueryable<object>>(Queryable.Distinct).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Distinct_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Distinct_TSource_2(Type TSource) =>
- (s_Distinct_TSource_2 ??= new Func<IQueryable<object>, IEqualityComparer<object>, IQueryable<object>>(Queryable.Distinct).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_DistinctBy_TSource_TKey_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo DistinctBy_TSource_TKey_2(Type TSource, Type TKey) =>
- (s_DistinctBy_TSource_TKey_2 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, IQueryable<object>>(Queryable.DistinctBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_DistinctBy_TSource_TKey_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo DistinctBy_TSource_TKey_3(Type TSource, Type TKey) =>
- (s_DistinctBy_TSource_TKey_3 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, IEqualityComparer<object>, IQueryable<object>>(Queryable.DistinctBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_ElementAt_Int32_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo ElementAt_Int32_TSource_2(Type TSource) =>
- (s_ElementAt_Int32_TSource_2 ??= new Func<IQueryable<object>, int, object>(Queryable.ElementAt).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_ElementAt_Index_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo ElementAt_Index_TSource_2(Type TSource) =>
- (s_ElementAt_Index_TSource_2 ??= new Func<IQueryable<object>, Index, object>(Queryable.ElementAt).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_ElementAtOrDefault_Int32_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo ElementAtOrDefault_Int32_TSource_2(Type TSource) =>
- (s_ElementAtOrDefault_Int32_TSource_2 ??= new Func<IQueryable<object>, int, object?>(Queryable.ElementAtOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_ElementAtOrDefault_Index_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo ElementAtOrDefault_Index_TSource_2(Type TSource) =>
- (s_ElementAtOrDefault_Index_TSource_2 ??= new Func<IQueryable<object>, Index, object?>(Queryable.ElementAtOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Except_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Except_TSource_2(Type TSource) =>
- (s_Except_TSource_2 ??= new Func<IQueryable<object>, IEnumerable<object>, IQueryable<object>>(Queryable.Except).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Except_TSource_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Except_TSource_3(Type TSource) =>
- (s_Except_TSource_3 ??= new Func<IQueryable<object>, IEnumerable<object>, IEqualityComparer<object>, IQueryable<object>>(Queryable.Except).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_ExceptBy_TSource_TKey_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo ExceptBy_TSource_TKey_3(Type TSource, Type TKey) =>
- (s_ExceptBy_TSource_TKey_3 ??= new Func<IQueryable<object>, IEnumerable<object>, Expression<Func<object, object>>, IQueryable<object>>(Queryable.ExceptBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_ExceptBy_TSource_TKey_4;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo ExceptBy_TSource_TKey_4(Type TSource, Type TKey) =>
- (s_ExceptBy_TSource_TKey_4 ??= new Func<IQueryable<object>, IEnumerable<object>, Expression<Func<object, object>>, IEqualityComparer<object>, IQueryable<object>>(Queryable.ExceptBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_First_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo First_TSource_1(Type TSource) =>
- (s_First_TSource_1 ??= new Func<IQueryable<object>, object>(Queryable.First).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_First_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo First_TSource_2(Type TSource) =>
- (s_First_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, object>(Queryable.First).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_FirstOrDefault_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo FirstOrDefault_TSource_1(Type TSource) =>
- (s_FirstOrDefault_TSource_1 ??= new Func<IQueryable<object>, object?>(Queryable.FirstOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_FirstOrDefault_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo FirstOrDefault_TSource_2(Type TSource) =>
- (s_FirstOrDefault_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, object?>(Queryable.FirstOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_FirstOrDefault_TSource_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo FirstOrDefault_TSource_3(Type TSource) =>
- (s_FirstOrDefault_TSource_3 ??= new Func<IQueryable<object>, object, object>(Queryable.FirstOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_FirstOrDefault_TSource_4;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo FirstOrDefault_TSource_4(Type TSource) =>
- (s_FirstOrDefault_TSource_4 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, object, object>(Queryable.FirstOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_GroupBy_TSource_TKey_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo GroupBy_TSource_TKey_2(Type TSource, Type TKey) =>
- (s_GroupBy_TSource_TKey_2 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, IQueryable<IGrouping<object, object>>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_GroupBy_TSource_TKey_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo GroupBy_TSource_TKey_3(Type TSource, Type TKey) =>
- (s_GroupBy_TSource_TKey_3 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, IEqualityComparer<object>, IQueryable<IGrouping<object, object>>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_GroupBy_TSource_TKey_TElement_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo GroupBy_TSource_TKey_TElement_3(Type TSource, Type TKey, Type TElement) =>
- (s_GroupBy_TSource_TKey_TElement_3 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, IQueryable<IGrouping<object, object>>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey, TElement);
-
- private static MethodInfo? s_GroupBy_TSource_TKey_TElement_4;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo GroupBy_TSource_TKey_TElement_4(Type TSource, Type TKey, Type TElement) =>
- (s_GroupBy_TSource_TKey_TElement_4 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, IEqualityComparer<object>, IQueryable<IGrouping<object, object>>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey, TElement);
-
- private static MethodInfo? s_GroupBy_TSource_TKey_TResult_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo GroupBy_TSource_TKey_TResult_3(Type TSource, Type TKey, Type TResult) =>
- (s_GroupBy_TSource_TKey_TResult_3 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, IEnumerable<object>, object>>, IQueryable<object>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey, TResult);
-
- private static MethodInfo? s_GroupBy_TSource_TKey_TResult_4;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo GroupBy_TSource_TKey_TResult_4(Type TSource, Type TKey, Type TResult) =>
- (s_GroupBy_TSource_TKey_TResult_4 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, IEnumerable<object>, object>>, IEqualityComparer<object>, IQueryable<object>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey, TResult);
-
- private static MethodInfo? s_GroupBy_TSource_TKey_TElement_TResult_4;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo GroupBy_TSource_TKey_TElement_TResult_4(Type TSource, Type TKey, Type TElement, Type TResult) =>
- (s_GroupBy_TSource_TKey_TElement_TResult_4 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, IEnumerable<object>, object>>, IQueryable<object>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey, TElement, TResult);
-
- private static MethodInfo? s_GroupBy_TSource_TKey_TElement_TResult_5;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo GroupBy_TSource_TKey_TElement_TResult_5(Type TSource, Type TKey, Type TElement, Type TResult) =>
- (s_GroupBy_TSource_TKey_TElement_TResult_5 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, IEnumerable<object>, object>>, IEqualityComparer<object>, IQueryable<object>>(Queryable.GroupBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey, TElement, TResult);
-
- private static MethodInfo? s_GroupJoin_TOuter_TInner_TKey_TResult_5;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo GroupJoin_TOuter_TInner_TKey_TResult_5(Type TOuter, Type TInner, Type TKey, Type TResult) =>
- (s_GroupJoin_TOuter_TInner_TKey_TResult_5 ??= new Func<IQueryable<object>, IEnumerable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, IEnumerable<object>, object>>, IQueryable<object>>(Queryable.GroupJoin).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TOuter, TInner, TKey, TResult);
-
- private static MethodInfo? s_GroupJoin_TOuter_TInner_TKey_TResult_6;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo GroupJoin_TOuter_TInner_TKey_TResult_6(Type TOuter, Type TInner, Type TKey, Type TResult) =>
- (s_GroupJoin_TOuter_TInner_TKey_TResult_6 ??= new Func<IQueryable<object>, IEnumerable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, IEnumerable<object>, object>>, IEqualityComparer<object>, IQueryable<object>>(Queryable.GroupJoin).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TOuter, TInner, TKey, TResult);
-
- private static MethodInfo? s_Intersect_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Intersect_TSource_2(Type TSource) =>
- (s_Intersect_TSource_2 ??= new Func<IQueryable<object>, IEnumerable<object>, IQueryable<object>>(Queryable.Intersect).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Intersect_TSource_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Intersect_TSource_3(Type TSource) =>
- (s_Intersect_TSource_3 ??= new Func<IQueryable<object>, IEnumerable<object>, IEqualityComparer<object>, IQueryable<object>>(Queryable.Intersect).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_IntersectBy_TSource_TKey_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo IntersectBy_TSource_TKey_3(Type TSource, Type TKey) =>
- (s_IntersectBy_TSource_TKey_3 ??= new Func<IQueryable<object>, IEnumerable<object>, Expression<Func<object, object>>, IQueryable<object>>(Queryable.IntersectBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_IntersectBy_TSource_TKey_4;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo IntersectBy_TSource_TKey_4(Type TSource, Type TKey) =>
- (s_IntersectBy_TSource_TKey_4 ??= new Func<IQueryable<object>, IEnumerable<object>, Expression<Func<object, object>>, IEqualityComparer<object>, IQueryable<object>>(Queryable.IntersectBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_Join_TOuter_TInner_TKey_TResult_5;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Join_TOuter_TInner_TKey_TResult_5(Type TOuter, Type TInner, Type TKey, Type TResult) =>
- (s_Join_TOuter_TInner_TKey_TResult_5 ??= new Func<IQueryable<object>, IEnumerable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, object, object>>, IQueryable<object>>(Queryable.Join).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TOuter, TInner, TKey, TResult);
-
- private static MethodInfo? s_Join_TOuter_TInner_TKey_TResult_6;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Join_TOuter_TInner_TKey_TResult_6(Type TOuter, Type TInner, Type TKey, Type TResult) =>
- (s_Join_TOuter_TInner_TKey_TResult_6 ??= new Func<IQueryable<object>, IEnumerable<object>, Expression<Func<object, object>>, Expression<Func<object, object>>, Expression<Func<object, object, object>>, IEqualityComparer<object>, IQueryable<object>>(Queryable.Join).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TOuter, TInner, TKey, TResult);
-
- private static MethodInfo? s_Last_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Last_TSource_1(Type TSource) =>
- (s_Last_TSource_1 ??= new Func<IQueryable<object>, object>(Queryable.Last).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Last_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Last_TSource_2(Type TSource) =>
- (s_Last_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, object>(Queryable.Last).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_LastOrDefault_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo LastOrDefault_TSource_1(Type TSource) =>
- (s_LastOrDefault_TSource_1 ??= new Func<IQueryable<object>, object?>(Queryable.LastOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_LastOrDefault_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo LastOrDefault_TSource_2(Type TSource) =>
- (s_LastOrDefault_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, object?>(Queryable.LastOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_LastOrDefault_TSource_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo LastOrDefault_TSource_3(Type TSource) =>
- (s_LastOrDefault_TSource_3 ??= new Func<IQueryable<object>, object, object>(Queryable.LastOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_LastOrDefault_TSource_4;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo LastOrDefault_TSource_4(Type TSource) =>
- (s_LastOrDefault_TSource_4 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, object, object>(Queryable.LastOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_LongCount_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo LongCount_TSource_1(Type TSource) =>
- (s_LongCount_TSource_1 ??= new Func<IQueryable<object>, long>(Queryable.LongCount).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_LongCount_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo LongCount_TSource_2(Type TSource) =>
- (s_LongCount_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, long>(Queryable.LongCount).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Max_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Max_TSource_1(Type TSource) =>
- (s_Max_TSource_1 ??= new Func<IQueryable<object>, object?>(Queryable.Max).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Max_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Max_TSource_2(Type TSource) =>
- (s_Max_TSource_2 ??= new Func<IQueryable<object>, IComparer<object>, object?>(Queryable.Max).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Max_TSource_TResult_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Max_TSource_TResult_2(Type TSource, Type TResult) =>
- (s_Max_TSource_TResult_2 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, object?>(Queryable.Max).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TResult);
-
- private static MethodInfo? s_MaxBy_TSource_TKey_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo MaxBy_TSource_TKey_2(Type TSource, Type TKey) =>
- (s_MaxBy_TSource_TKey_2 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, object?>(Queryable.MaxBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_MaxBy_TSource_TKey_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo MaxBy_TSource_TKey_3(Type TSource, Type TKey) =>
- (s_MaxBy_TSource_TKey_3 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, IComparer<object>, object?>(Queryable.MaxBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_Min_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Min_TSource_1(Type TSource) =>
- (s_Min_TSource_1 ??= new Func<IQueryable<object>, object?>(Queryable.Min).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Min_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Min_TSource_2(Type TSource) =>
- (s_Min_TSource_2 ??= new Func<IQueryable<object>, IComparer<object>, object?>(Queryable.Min).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Min_TSource_TResult_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Min_TSource_TResult_2(Type TSource, Type TResult) =>
- (s_Min_TSource_TResult_2 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, object?>(Queryable.Min).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TResult);
-
- private static MethodInfo? s_MinBy_TSource_TKey_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo MinBy_TSource_TKey_2(Type TSource, Type TKey) =>
- (s_MinBy_TSource_TKey_2 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, object?>(Queryable.MinBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_MinBy_TSource_TKey_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo MinBy_TSource_TKey_3(Type TSource, Type TKey) =>
- (s_MinBy_TSource_TKey_3 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, IComparer<object>, object?>(Queryable.MinBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_OfType_TResult_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo OfType_TResult_1(Type TResult) =>
- (s_OfType_TResult_1 ??= new Func<IQueryable, IQueryable<object>>(Queryable.OfType<object>).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TResult);
-
- private static MethodInfo? s_Order_T_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Order_T_1(Type T) =>
- (s_Order_T_1 ??= new Func<IQueryable<object>, IOrderedQueryable<object>>(Queryable.Order).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(T);
-
- private static MethodInfo? s_Order_T_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Order_T_2(Type T) =>
- (s_Order_T_2 ??= new Func<IQueryable<object>, IComparer<object>, IOrderedQueryable<object>>(Queryable.Order).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(T);
-
- private static MethodInfo? s_OrderBy_TSource_TKey_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo OrderBy_TSource_TKey_2(Type TSource, Type TKey) =>
- (s_OrderBy_TSource_TKey_2 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, IOrderedQueryable<object>>(Queryable.OrderBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_OrderDescending_T_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo OrderDescending_T_1(Type T) =>
- (s_OrderDescending_T_1 ??= new Func<IQueryable<object>, IOrderedQueryable<object>>(Queryable.OrderDescending).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(T);
-
- private static MethodInfo? s_OrderDescending_T_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo OrderDescending_T_2(Type T) =>
- (s_OrderDescending_T_2 ??= new Func<IQueryable<object>, IComparer<object>, IOrderedQueryable<object>>(Queryable.OrderDescending).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(T);
-
- private static MethodInfo? s_OrderBy_TSource_TKey_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo OrderBy_TSource_TKey_3(Type TSource, Type TKey) =>
- (s_OrderBy_TSource_TKey_3 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, IComparer<object>, IOrderedQueryable<object>>(Queryable.OrderBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_OrderByDescending_TSource_TKey_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo OrderByDescending_TSource_TKey_2(Type TSource, Type TKey) =>
- (s_OrderByDescending_TSource_TKey_2 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, IOrderedQueryable<object>>(Queryable.OrderByDescending).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_OrderByDescending_TSource_TKey_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo OrderByDescending_TSource_TKey_3(Type TSource, Type TKey) =>
- (s_OrderByDescending_TSource_TKey_3 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, IComparer<object>, IOrderedQueryable<object>>(Queryable.OrderByDescending).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_Reverse_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Reverse_TSource_1(Type TSource) =>
- (s_Reverse_TSource_1 ??= new Func<IQueryable<object>, IQueryable<object>>(Queryable.Reverse).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Select_TSource_TResult_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Select_TSource_TResult_2(Type TSource, Type TResult) =>
- (s_Select_TSource_TResult_2 ??= new Func<IQueryable<object>, Expression<Func<object, object>>, IQueryable<object>>(Queryable.Select).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TResult);
-
- private static MethodInfo? s_Select_Index_TSource_TResult_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Select_Index_TSource_TResult_2(Type TSource, Type TResult) =>
- (s_Select_Index_TSource_TResult_2 ??= new Func<IQueryable<object>, Expression<Func<object, int, object>>, IQueryable<object>>(Queryable.Select).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TResult);
-
- private static MethodInfo? s_SelectMany_TSource_TResult_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SelectMany_TSource_TResult_2(Type TSource, Type TResult) =>
- (s_SelectMany_TSource_TResult_2 ??= new Func<IQueryable<object>, Expression<Func<object, IEnumerable<object>>>, IQueryable<object>>(Queryable.SelectMany).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TResult);
-
- private static MethodInfo? s_SelectMany_Index_TSource_TResult_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SelectMany_Index_TSource_TResult_2(Type TSource, Type TResult) =>
- (s_SelectMany_Index_TSource_TResult_2 ??= new Func<IQueryable<object>, Expression<Func<object, int, IEnumerable<object>>>, IQueryable<object>>(Queryable.SelectMany).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TResult);
-
- private static MethodInfo? s_SelectMany_Index_TSource_TCollection_TResult_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SelectMany_Index_TSource_TCollection_TResult_3(Type TSource, Type TCollection, Type TResult) =>
- (s_SelectMany_Index_TSource_TCollection_TResult_3 ??= new Func<IQueryable<object>, Expression<Func<object, int, IEnumerable<object>>>, Expression<Func<object, object, object>>, IQueryable<object>>(Queryable.SelectMany).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TCollection, TResult);
-
- private static MethodInfo? s_SelectMany_TSource_TCollection_TResult_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SelectMany_TSource_TCollection_TResult_3(Type TSource, Type TCollection, Type TResult) =>
- (s_SelectMany_TSource_TCollection_TResult_3 ??= new Func<IQueryable<object>, Expression<Func<object, IEnumerable<object>>>, Expression<Func<object, object, object>>, IQueryable<object>>(Queryable.SelectMany).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TCollection, TResult);
-
- private static MethodInfo? s_SequenceEqual_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SequenceEqual_TSource_2(Type TSource) =>
- (s_SequenceEqual_TSource_2 ??= new Func<IQueryable<object>, IEnumerable<object>, bool>(Queryable.SequenceEqual).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_SequenceEqual_TSource_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SequenceEqual_TSource_3(Type TSource) =>
- (s_SequenceEqual_TSource_3 ??= new Func<IQueryable<object>, IEnumerable<object>, IEqualityComparer<object>, bool>(Queryable.SequenceEqual).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Single_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Single_TSource_1(Type TSource) =>
- (s_Single_TSource_1 ??= new Func<IQueryable<object>, object>(Queryable.Single).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Single_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Single_TSource_2(Type TSource) =>
- (s_Single_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, object>(Queryable.Single).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_SingleOrDefault_TSource_1;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SingleOrDefault_TSource_1(Type TSource) =>
- (s_SingleOrDefault_TSource_1 ??= new Func<IQueryable<object>, object?>(Queryable.SingleOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_SingleOrDefault_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SingleOrDefault_TSource_2(Type TSource) =>
- (s_SingleOrDefault_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, object?>(Queryable.SingleOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_SingleOrDefault_TSource_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SingleOrDefault_TSource_3(Type TSource) =>
- (s_SingleOrDefault_TSource_3 ??= new Func<IQueryable<object>, object, object>(Queryable.SingleOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_SingleOrDefault_TSource_4;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SingleOrDefault_TSource_4(Type TSource) =>
- (s_SingleOrDefault_TSource_4 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, object, object>(Queryable.SingleOrDefault).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Skip_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Skip_TSource_2(Type TSource) =>
- (s_Skip_TSource_2 ??= new Func<IQueryable<object>, int, IQueryable<object>>(Queryable.Skip).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_SkipWhile_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SkipWhile_TSource_2(Type TSource) =>
- (s_SkipWhile_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, IQueryable<object>>(Queryable.SkipWhile).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_SkipWhile_Index_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SkipWhile_Index_TSource_2(Type TSource) =>
- (s_SkipWhile_Index_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, int, bool>>, IQueryable<object>>(Queryable.SkipWhile).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Sum_Int32_1;
-
- public static MethodInfo Sum_Int32_1 =>
- s_Sum_Int32_1 ??= new Func<IQueryable<int>, int>(Queryable.Sum).GetMethodInfo();
-
- private static MethodInfo? s_Sum_NullableInt32_1;
-
- public static MethodInfo Sum_NullableInt32_1 =>
- s_Sum_NullableInt32_1 ??= new Func<IQueryable<int?>, int?>(Queryable.Sum).GetMethodInfo();
-
- private static MethodInfo? s_Sum_Int64_1;
-
- public static MethodInfo Sum_Int64_1 =>
- s_Sum_Int64_1 ??= new Func<IQueryable<long>, long>(Queryable.Sum).GetMethodInfo();
-
- private static MethodInfo? s_Sum_NullableInt64_1;
-
- public static MethodInfo Sum_NullableInt64_1 =>
- s_Sum_NullableInt64_1 ??= new Func<IQueryable<long?>, long?>(Queryable.Sum).GetMethodInfo();
-
- private static MethodInfo? s_Sum_Single_1;
-
- public static MethodInfo Sum_Single_1 =>
- s_Sum_Single_1 ??= new Func<IQueryable<float>, float>(Queryable.Sum).GetMethodInfo();
-
- private static MethodInfo? s_Sum_NullableSingle_1;
-
- public static MethodInfo Sum_NullableSingle_1 =>
- s_Sum_NullableSingle_1 ??= new Func<IQueryable<float?>, float?>(Queryable.Sum).GetMethodInfo();
-
- private static MethodInfo? s_Sum_Double_1;
-
- public static MethodInfo Sum_Double_1 =>
- s_Sum_Double_1 ??= new Func<IQueryable<double>, double>(Queryable.Sum).GetMethodInfo();
-
- private static MethodInfo? s_Sum_NullableDouble_1;
-
- public static MethodInfo Sum_NullableDouble_1 =>
- s_Sum_NullableDouble_1 ??= new Func<IQueryable<double?>, double?>(Queryable.Sum).GetMethodInfo();
-
- private static MethodInfo? s_Sum_Decimal_1;
-
- public static MethodInfo Sum_Decimal_1 =>
- s_Sum_Decimal_1 ??= new Func<IQueryable<decimal>, decimal>(Queryable.Sum).GetMethodInfo();
-
- private static MethodInfo? s_Sum_NullableDecimal_1;
-
- public static MethodInfo Sum_NullableDecimal_1 =>
- s_Sum_NullableDecimal_1 ??= new Func<IQueryable<decimal?>, decimal?>(Queryable.Sum).GetMethodInfo();
-
- private static MethodInfo? s_Sum_NullableDecimal_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Sum_NullableDecimal_TSource_2(Type TSource) =>
- (s_Sum_NullableDecimal_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, decimal?>>, decimal?>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Sum_Int32_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Sum_Int32_TSource_2(Type TSource) =>
- (s_Sum_Int32_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, int>>, int>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Sum_NullableInt32_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Sum_NullableInt32_TSource_2(Type TSource) =>
- (s_Sum_NullableInt32_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, int?>>, int?>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Sum_Int64_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Sum_Int64_TSource_2(Type TSource) =>
- (s_Sum_Int64_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, long>>, long>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Sum_NullableInt64_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Sum_NullableInt64_TSource_2(Type TSource) =>
- (s_Sum_NullableInt64_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, long?>>, long?>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Sum_Single_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Sum_Single_TSource_2(Type TSource) =>
- (s_Sum_Single_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, float>>, float>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Sum_NullableSingle_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Sum_NullableSingle_TSource_2(Type TSource) =>
- (s_Sum_NullableSingle_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, float?>>, float?>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Sum_Double_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Sum_Double_TSource_2(Type TSource) =>
- (s_Sum_Double_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, double>>, double>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Sum_NullableDouble_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Sum_NullableDouble_TSource_2(Type TSource) =>
- (s_Sum_NullableDouble_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, double?>>, double?>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Sum_Decimal_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Sum_Decimal_TSource_2(Type TSource) =>
- (s_Sum_Decimal_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, decimal>>, decimal>(Queryable.Sum).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Take_Int32_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Take_Int32_TSource_2(Type TSource) =>
- (s_Take_Int32_TSource_2 ??= new Func<IQueryable<object>, int, IQueryable<object>>(Queryable.Take).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Take_Range_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Take_Range_TSource_2(Type TSource) =>
- (s_Take_Range_TSource_2 ??= new Func<IQueryable<object>, Range, IQueryable<object>>(Queryable.Take).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_TakeWhile_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo TakeWhile_TSource_2(Type TSource) =>
- (s_TakeWhile_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, IQueryable<object>>(Queryable.TakeWhile).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_TakeWhile_Index_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo TakeWhile_Index_TSource_2(Type TSource) =>
- (s_TakeWhile_Index_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, int, bool>>, IQueryable<object>>(Queryable.TakeWhile).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_ThenBy_TSource_TKey_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo ThenBy_TSource_TKey_2(Type TSource, Type TKey) =>
- (s_ThenBy_TSource_TKey_2 ??= new Func<IOrderedQueryable<object>, Expression<Func<object, object>>, IOrderedQueryable<object>>(Queryable.ThenBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_ThenBy_TSource_TKey_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo ThenBy_TSource_TKey_3(Type TSource, Type TKey) =>
- (s_ThenBy_TSource_TKey_3 ??= new Func<IOrderedQueryable<object>, Expression<Func<object, object>>, IComparer<object>, IOrderedQueryable<object>>(Queryable.ThenBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_ThenByDescending_TSource_TKey_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo ThenByDescending_TSource_TKey_2(Type TSource, Type TKey) =>
- (s_ThenByDescending_TSource_TKey_2 ??= new Func<IOrderedQueryable<object>, Expression<Func<object, object>>, IOrderedQueryable<object>>(Queryable.ThenByDescending).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_ThenByDescending_TSource_TKey_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo ThenByDescending_TSource_TKey_3(Type TSource, Type TKey) =>
- (s_ThenByDescending_TSource_TKey_3 ??= new Func<IOrderedQueryable<object>, Expression<Func<object, object>>, IComparer<object>, IOrderedQueryable<object>>(Queryable.ThenByDescending).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_Union_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Union_TSource_2(Type TSource) =>
- (s_Union_TSource_2 ??= new Func<IQueryable<object>, IEnumerable<object>, IQueryable<object>>(Queryable.Union).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Union_TSource_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Union_TSource_3(Type TSource) =>
- (s_Union_TSource_3 ??= new Func<IQueryable<object>, IEnumerable<object>, IEqualityComparer<object>, IQueryable<object>>(Queryable.Union).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_UnionBy_TSource_TKey_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo UnionBy_TSource_TKey_3(Type TSource, Type TKey) =>
- (s_UnionBy_TSource_TKey_3 ??= new Func<IQueryable<object>, IEnumerable<object>, Expression<Func<object, object>>, IQueryable<object>>(Queryable.UnionBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_UnionBy_TSource_TKey_4;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo UnionBy_TSource_TKey_4(Type TSource, Type TKey) =>
- (s_UnionBy_TSource_TKey_4 ??= new Func<IQueryable<object>, IEnumerable<object>, Expression<Func<object, object>>, IEqualityComparer<object>, IQueryable<object>>(Queryable.UnionBy).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource, TKey);
-
- private static MethodInfo? s_Where_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Where_TSource_2(Type TSource) =>
- (s_Where_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, bool>>, IQueryable<object>>(Queryable.Where).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Where_Index_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Where_Index_TSource_2(Type TSource) =>
- (s_Where_Index_TSource_2 ??= new Func<IQueryable<object>, Expression<Func<object, int, bool>>, IQueryable<object>>(Queryable.Where).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Zip_TFirst_TSecond_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Zip_TFirst_TSecond_2(Type TFirst, Type TSecond) =>
- (s_Zip_TFirst_TSecond_2 ??= new Func<IQueryable<object>, IEnumerable<object>, IQueryable<(object, object)>>(Queryable.Zip).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TFirst, TSecond);
-
- private static MethodInfo? s_Zip_TFirst_TSecond_TResult_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Zip_TFirst_TSecond_TResult_3(Type TFirst, Type TSecond, Type TResult) =>
- (s_Zip_TFirst_TSecond_TResult_3 ??= new Func<IQueryable<object>, IEnumerable<object>, Expression<Func<object, object, object>>, IQueryable<object>>(Queryable.Zip).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TFirst, TSecond, TResult);
-
- private static MethodInfo? s_Zip_TFirst_TSecond_TThird_3;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Zip_TFirst_TSecond_TThird_3(Type TFirst, Type TSecond, Type TThird) =>
- (s_Zip_TFirst_TSecond_TThird_3 ??= new Func<IQueryable<object>, IEnumerable<object>, IEnumerable<object>, IQueryable<(object, object, object)>>(Queryable.Zip).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TFirst, TSecond, TThird);
-
-
- private static MethodInfo? s_SkipLast_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo SkipLast_TSource_2(Type TSource) =>
- (s_SkipLast_TSource_2 ??= new Func<IQueryable<object>, int, IQueryable<object>>(Queryable.SkipLast).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_TakeLast_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo TakeLast_TSource_2(Type TSource) =>
- (s_TakeLast_TSource_2 ??= new Func<IQueryable<object>, int, IQueryable<object>>(Queryable.TakeLast).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Append_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Append_TSource_2(Type TSource) =>
- (s_Append_TSource_2 ??= new Func<IQueryable<object>, object, IQueryable<object>>(Queryable.Append).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
-
- private static MethodInfo? s_Prepend_TSource_2;
-
- [RequiresDynamicCode("Calls System.Reflection.MethodInfo.MakeGenericMethod(params Type[])")]
- public static MethodInfo Prepend_TSource_2(Type TSource) =>
- (s_Prepend_TSource_2 ??= new Func<IQueryable<object>, object, IQueryable<object>>(Queryable.Prepend).GetMethodInfo().GetGenericMethodDefinition())
- .MakeGenericMethod(TSource);
- }
-}
public static class Queryable
{
internal const string InMemoryQueryableExtensionMethodsRequiresUnreferencedCode = "Enumerating in-memory collections as IQueryable can require unreferenced code because expressions referencing IQueryable extension methods can get rebound to IEnumerable extension methods. The IEnumerable extension methods could be trimmed causing the application to fail at runtime.";
- internal const string InMemoryQueryableExtensionMethodsRequiresDynamicCode = "Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.";
+ internal const string InMemoryQueryableExtensionMethodsRequiresDynamicCode = "Enumerating in-memory collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.";
[RequiresUnreferencedCode(InMemoryQueryableExtensionMethodsRequiresUnreferencedCode)]
[RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
}
[DynamicDependency("Where`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Where<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Where_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, IQueryable<TSource>>(Where).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("Where`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Where<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Where_Index_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, int, bool>>, IQueryable<TSource>>(Where).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("OfType`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> OfType<TResult>(this IQueryable source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.OfType_TResult_1(typeof(TResult)), source.Expression));
+ new Func<IQueryable, IQueryable<TResult>>(OfType<TResult>).Method,
+ source.Expression));
}
[DynamicDependency("Cast`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> Cast<TResult>(this IQueryable source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.Cast_TResult_1(typeof(TResult)), source.Expression));
+ new Func<IQueryable, IQueryable<TResult>>(Cast<TResult>).Method,
+ source.Expression));
}
[DynamicDependency("Select`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> Select<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TResult>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.Select_TSource_TResult_2(typeof(TSource), typeof(TResult)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TResult>>, IQueryable<TResult>>(Select).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Select`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> Select<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, int, TResult>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.Select_Index_TSource_TResult_2(typeof(TSource), typeof(TResult)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, int, TResult>>, IQueryable<TResult>>(Select).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("SelectMany`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> SelectMany<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, IEnumerable<TResult>>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.SelectMany_TSource_TResult_2(typeof(TSource), typeof(TResult)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, IEnumerable<TResult>>>, IQueryable<TResult>>(SelectMany).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("SelectMany`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> SelectMany<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, int, IEnumerable<TResult>>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.SelectMany_Index_TSource_TResult_2(typeof(TSource), typeof(TResult)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, int, IEnumerable<TResult>>>, IQueryable<TResult>>(SelectMany).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("SelectMany`3", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> SelectMany<TSource, TCollection, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, int, IEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.SelectMany_Index_TSource_TCollection_TResult_3(typeof(TSource), typeof(TCollection), typeof(TResult)),
- source.Expression, Expression.Quote(collectionSelector), Expression.Quote(resultSelector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, int, IEnumerable<TCollection>>>, Expression<Func<TSource, TCollection, TResult>>, IQueryable<TResult>>(SelectMany).Method,
+ source.Expression, Expression.Quote(collectionSelector), Expression.Quote(resultSelector)));
}
[DynamicDependency("SelectMany`3", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> SelectMany<TSource, TCollection, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, IEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.SelectMany_TSource_TCollection_TResult_3(typeof(TSource), typeof(TCollection), typeof(TResult)),
- source.Expression, Expression.Quote(collectionSelector), Expression.Quote(resultSelector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, IEnumerable<TCollection>>>, Expression<Func<TSource, TCollection, TResult>>, IQueryable<TResult>>(SelectMany).Method,
+ source.Expression, Expression.Quote(collectionSelector), Expression.Quote(resultSelector)));
}
private static Expression GetSourceExpression<TSource>(IEnumerable<TSource> source)
}
[DynamicDependency("Join`4", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> Join<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector)
{
ArgumentNullException.ThrowIfNull(outer);
return outer.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.Join_TOuter_TInner_TKey_TResult_5(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector)));
+ new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>, IQueryable<TResult>>(Join).Method,
+ outer.Expression, GetSourceExpression(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector)));
}
[DynamicDependency("Join`4", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> Join<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector, IEqualityComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(outer);
return outer.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.Join_TOuter_TInner_TKey_TResult_6(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
+ new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(Join).Method,
+ outer.Expression, GetSourceExpression(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
}
[DynamicDependency("GroupJoin`4", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector)
{
ArgumentNullException.ThrowIfNull(outer);
return outer.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.GroupJoin_TOuter_TInner_TKey_TResult_5(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector)));
+ new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>, IQueryable<TResult>>(GroupJoin).Method,
+ outer.Expression, GetSourceExpression(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector)));
}
[DynamicDependency("GroupJoin`4", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(outer);
return outer.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.GroupJoin_TOuter_TInner_TKey_TResult_6(typeof(TOuter), typeof(TInner), typeof(TKey), typeof(TResult)), outer.Expression, GetSourceExpression(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
+ new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(GroupJoin).Method,
+ outer.Expression, GetSourceExpression(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
}
/// <summary>
/// The expected behavior is that it sorts the elements of <paramref name="source"/> by itself.
/// </remarks>
[DynamicDependency("Order`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<T> Order<T>(this IQueryable<T> source)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<T>)source.Provider.CreateQuery<T>(
Expression.Call(
null,
- CachedReflectionInfo.Order_T_1(typeof(T)),
- source.Expression
- ));
+ new Func<IQueryable<T>, IOrderedQueryable<T>>(Order).Method,
+ source.Expression));
}
/// <summary>
/// The expected behavior is that it sorts the elements of <paramref name="source"/> by itself.
/// </remarks>
[DynamicDependency("Order`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<T> Order<T>(this IQueryable<T> source, IComparer<T> comparer)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<T>)source.Provider.CreateQuery<T>(
Expression.Call(
null,
- CachedReflectionInfo.Order_T_2(typeof(T)),
- source.Expression, Expression.Constant(comparer, typeof(IComparer<T>))
- ));
+ new Func<IQueryable<T>, IComparer<T>, IOrderedQueryable<T>>(Order).Method,
+ source.Expression, Expression.Constant(comparer, typeof(IComparer<T>))));
}
[DynamicDependency("OrderBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<TSource> OrderBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<TSource>)source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.OrderBy_TSource_TKey_2(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IOrderedQueryable<TSource>>(OrderBy).Method,
+ source.Expression, Expression.Quote(keySelector)));
}
[DynamicDependency("OrderBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<TSource> OrderBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<TSource>)source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.OrderBy_TSource_TKey_3(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>))
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(OrderBy).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>))));
}
/// <summary>
/// The expected behavior is that it sorts the elements of <paramref name="source"/> by itself.
/// </remarks>
[DynamicDependency("OrderDescending`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<T> OrderDescending<T>(this IQueryable<T> source)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<T>)source.Provider.CreateQuery<T>(
Expression.Call(
null,
- CachedReflectionInfo.OrderDescending_T_1(typeof(T)),
- source.Expression
- ));
+ new Func<IQueryable<T>, IOrderedQueryable<T>>(OrderDescending).Method,
+ source.Expression));
}
/// <summary>
/// The expected behavior is that it sorts the elements of <paramref name="source"/> by itself.
/// </remarks>
[DynamicDependency("OrderDescending`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<T> OrderDescending<T>(this IQueryable<T> source, IComparer<T> comparer)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<T>)source.Provider.CreateQuery<T>(
Expression.Call(
null,
- CachedReflectionInfo.OrderDescending_T_2(typeof(T)),
- source.Expression, Expression.Constant(comparer, typeof(IComparer<T>))
- ));
+ new Func<IQueryable<T>, IComparer<T>, IOrderedQueryable<T>>(OrderDescending).Method,
+ source.Expression, Expression.Constant(comparer, typeof(IComparer<T>))));
}
[DynamicDependency("OrderByDescending`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<TSource> OrderByDescending<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<TSource>)source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.OrderByDescending_TSource_TKey_2(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IOrderedQueryable<TSource>>(OrderByDescending).Method,
+ source.Expression, Expression.Quote(keySelector)));
}
[DynamicDependency("OrderByDescending`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<TSource> OrderByDescending<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<TSource>)source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.OrderByDescending_TSource_TKey_3(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>))
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(OrderByDescending).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>))));
}
[DynamicDependency("ThenBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<TSource> ThenBy<TSource, TKey>(this IOrderedQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<TSource>)source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.ThenBy_TSource_TKey_2(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector)
- ));
+ new Func<IOrderedQueryable<TSource>, Expression<Func<TSource, TKey>>, IOrderedQueryable<TSource>>(ThenBy).Method,
+ source.Expression, Expression.Quote(keySelector)));
}
[DynamicDependency("ThenBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<TSource> ThenBy<TSource, TKey>(this IOrderedQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<TSource>)source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.ThenBy_TSource_TKey_3(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>))
- ));
+ new Func<IOrderedQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(ThenBy).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>))));
}
[DynamicDependency("ThenByDescending`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<TSource> ThenByDescending<TSource, TKey>(this IOrderedQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<TSource>)source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.ThenByDescending_TSource_TKey_2(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector)
- ));
+ new Func<IOrderedQueryable<TSource>, Expression<Func<TSource, TKey>>, IOrderedQueryable<TSource>>(ThenByDescending).Method,
+ source.Expression, Expression.Quote(keySelector)));
}
[DynamicDependency("ThenByDescending`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IOrderedQueryable<TSource> ThenByDescending<TSource, TKey>(this IOrderedQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return (IOrderedQueryable<TSource>)source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.ThenByDescending_TSource_TKey_3(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>))
- ));
+ new Func<IOrderedQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(ThenByDescending).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>))));
}
[DynamicDependency("Take`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Take<TSource>(this IQueryable<TSource> source, int count)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Take_Int32_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(count)
- ));
+ new Func<IQueryable<TSource>, int, IQueryable<TSource>>(Take).Method,
+ source.Expression, Expression.Constant(count)));
}
/// <summary>Returns a specified range of contiguous elements from a sequence.</summary>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
/// <returns>An <see cref="IQueryable{T}" /> that contains the specified <paramref name="range" /> of elements from the <paramref name="source" /> sequence.</returns>
[DynamicDependency("Take`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Take<TSource>(this IQueryable<TSource> source, Range range)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Take_Range_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(range)
- ));
+ new Func<IQueryable<TSource>, Range, IQueryable<TSource>>(Take).Method,
+ source.Expression, Expression.Constant(range)));
}
[DynamicDependency("TakeWhile`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> TakeWhile<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.TakeWhile_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, IQueryable<TSource>>(TakeWhile).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("TakeWhile`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> TakeWhile<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.TakeWhile_Index_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, int, bool>>, IQueryable<TSource>>(TakeWhile).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("Skip`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Skip<TSource>(this IQueryable<TSource> source, int count)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Skip_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(count)
- ));
+ new Func<IQueryable<TSource>, int, IQueryable<TSource>>(Skip).Method,
+ source.Expression, Expression.Constant(count)));
}
[DynamicDependency("SkipWhile`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> SkipWhile<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.SkipWhile_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, IQueryable<TSource>>(SkipWhile).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("SkipWhile`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> SkipWhile<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.SkipWhile_Index_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, int, bool>>, IQueryable<TSource>>(SkipWhile).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("GroupBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<IGrouping<TKey, TSource>>(
Expression.Call(
null,
- CachedReflectionInfo.GroupBy_TSource_TKey_2(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IQueryable<IGrouping<TKey, TSource>>>(GroupBy).Method,
+ source.Expression, Expression.Quote(keySelector)));
}
[DynamicDependency("GroupBy`3", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<IGrouping<TKey, TElement>>(
Expression.Call(
null,
- CachedReflectionInfo.GroupBy_TSource_TKey_TElement_3(typeof(TSource), typeof(TKey), typeof(TElement)),
- source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, IQueryable<IGrouping<TKey, TElement>>>(GroupBy).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector)));
}
[DynamicDependency("GroupBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<IGrouping<TKey, TSource>>(
Expression.Call(
null,
- CachedReflectionInfo.GroupBy_TSource_TKey_3(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<IGrouping<TKey, TSource>>>(GroupBy).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
}
[DynamicDependency("GroupBy`3", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, IEqualityComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<IGrouping<TKey, TElement>>(
Expression.Call(
null,
- CachedReflectionInfo.GroupBy_TSource_TKey_TElement_4(typeof(TSource), typeof(TKey), typeof(TElement)), source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, IEqualityComparer<TKey>, IQueryable<IGrouping<TKey, TElement>>>(GroupBy).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
}
[DynamicDependency("GroupBy`4", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, Expression<Func<TKey, IEnumerable<TElement>, TResult>> resultSelector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.GroupBy_TSource_TKey_TElement_TResult_4(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Quote(resultSelector)));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, Expression<Func<TKey, IEnumerable<TElement>, TResult>>, IQueryable<TResult>>(GroupBy).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Quote(resultSelector)));
}
[DynamicDependency("GroupBy`3", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> GroupBy<TSource, TKey, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.GroupBy_TSource_TKey_TResult_3(typeof(TSource), typeof(TKey), typeof(TResult)),
- source.Expression, Expression.Quote(keySelector), Expression.Quote(resultSelector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>, IQueryable<TResult>>(GroupBy).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Quote(resultSelector)));
}
[DynamicDependency("GroupBy`3", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> GroupBy<TSource, TKey, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.GroupBy_TSource_TKey_TResult_4(typeof(TSource), typeof(TKey), typeof(TResult)), source.Expression, Expression.Quote(keySelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(GroupBy).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
}
[DynamicDependency("GroupBy`4", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, Expression<Func<TKey, IEnumerable<TElement>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.GroupBy_TSource_TKey_TElement_TResult_5(typeof(TSource), typeof(TKey), typeof(TElement), typeof(TResult)), source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, Expression<Func<TKey, IEnumerable<TElement>, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(GroupBy).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
}
[DynamicDependency("Distinct`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Distinct<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Distinct_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, IQueryable<TSource>>(Distinct).Method,
+ source.Expression));
}
[DynamicDependency("Distinct`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Distinct<TSource>(this IQueryable<TSource> source, IEqualityComparer<TSource>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Distinct_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))
- ));
+ new Func<IQueryable<TSource>, IEqualityComparer<TSource>, IQueryable<TSource>>(Distinct).Method,
+ source.Expression, Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
}
/// <summary>Returns distinct elements from a sequence according to a specified key selector function.</summary>
/// <returns>An <see cref="IQueryable{T}" /> that contains distinct elements from the source sequence.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
[DynamicDependency("DistinctBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> DistinctBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.DistinctBy_TSource_TKey_2(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IQueryable<TSource>>(DistinctBy).Method,
+ source.Expression, Expression.Quote(keySelector)));
}
/// <summary>Returns distinct elements from a sequence according to a specified key selector function.</summary>
/// <returns>An <see cref="IQueryable{T}" /> that contains distinct elements from the source sequence.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
[DynamicDependency("DistinctBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> DistinctBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.DistinctBy_TSource_TKey_3(typeof(TSource), typeof(TKey)),
- source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<TSource>>(DistinctBy).Method,
+ source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
}
/// <summary>Split the elements of a sequence into chunks of size at most <paramref name="size"/>.</summary>
/// <para>The last chunk will contain the remaining elements and may be of a smaller size.</para>
/// </remarks>
[DynamicDependency("Chunk`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource[]> Chunk<TSource>(this IQueryable<TSource> source, int size)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource[]>(
Expression.Call(
null,
- CachedReflectionInfo.Chunk_TSource_1(typeof(TSource)),
- source.Expression, Expression.Constant(size)
- ));
+ new Func<IQueryable<TSource>, int, IQueryable<TSource[]>>(Chunk).Method,
+ source.Expression, Expression.Constant(size)));
}
[DynamicDependency("Concat`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Concat<TSource>(this IQueryable<TSource> source1, IEnumerable<TSource> source2)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Concat_TSource_2(typeof(TSource)),
- source1.Expression, GetSourceExpression(source2)
- ));
+ new Func<IQueryable<TSource>, IEnumerable<TSource>, IQueryable<TSource>>(Concat).Method,
+ source1.Expression, GetSourceExpression(source2)));
}
[DynamicDependency("Zip`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<(TFirst First, TSecond Second)> Zip<TFirst, TSecond>(this IQueryable<TFirst> source1, IEnumerable<TSecond> source2)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<(TFirst, TSecond)>(
Expression.Call(
null,
- CachedReflectionInfo.Zip_TFirst_TSecond_2(typeof(TFirst), typeof(TSecond)),
+ new Func<IQueryable<TFirst>, IEnumerable<TSecond>, IQueryable<(TFirst, TSecond)>>(Zip).Method,
source1.Expression, GetSourceExpression(source2)));
}
[DynamicDependency("Zip`3", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TResult> Zip<TFirst, TSecond, TResult>(this IQueryable<TFirst> source1, IEnumerable<TSecond> source2, Expression<Func<TFirst, TSecond, TResult>> resultSelector)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.Zip_TFirst_TSecond_TResult_3(typeof(TFirst), typeof(TSecond), typeof(TResult)),
- source1.Expression, GetSourceExpression(source2), Expression.Quote(resultSelector)
- ));
+ new Func<IQueryable<TFirst>, IEnumerable<TSecond>, Expression<Func<TFirst, TSecond, TResult>>, IQueryable<TResult>>(Zip).Method,
+ source1.Expression, GetSourceExpression(source2), Expression.Quote(resultSelector)));
}
/// <summary>
/// <param name="source3">The third sequence to merge.</param>
/// <returns>A sequence of tuples with elements taken from the first, second and third sequences, in that order.</returns>
[DynamicDependency("Zip`3", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<(TFirst First, TSecond Second, TThird Third)> Zip<TFirst, TSecond, TThird>(this IQueryable<TFirst> source1, IEnumerable<TSecond> source2, IEnumerable<TThird> source3)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<(TFirst, TSecond, TThird)>(
Expression.Call(
null,
- CachedReflectionInfo.Zip_TFirst_TSecond_TThird_3(typeof(TFirst), typeof(TSecond), typeof(TThird)),
- source1.Expression, GetSourceExpression(source2), GetSourceExpression(source3)
- ));
+ new Func<IQueryable<TFirst>, IEnumerable<TSecond>, IEnumerable<TThird>, IQueryable<(TFirst, TSecond, TThird)>>(Zip).Method,
+ source1.Expression, GetSourceExpression(source2), GetSourceExpression(source3)));
}
[DynamicDependency("Union`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Union<TSource>(this IQueryable<TSource> source1, IEnumerable<TSource> source2)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Union_TSource_2(typeof(TSource)),
- source1.Expression, GetSourceExpression(source2)
- ));
+ new Func<IQueryable<TSource>, IEnumerable<TSource>, IQueryable<TSource>>(Union).Method,
+ source1.Expression, GetSourceExpression(source2)));
}
[DynamicDependency("Union`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Union<TSource>(this IQueryable<TSource> source1, IEnumerable<TSource> source2, IEqualityComparer<TSource>? comparer)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Union_TSource_3(typeof(TSource)),
+ new Func<IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>, IQueryable<TSource>>(Union).Method,
source1.Expression,
GetSourceExpression(source2),
- Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))
- ));
+ Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
}
/// <summary>Produces the set union of two sequences according to a specified key selector function.</summary>
/// <returns>An <see cref="IQueryable{T}" /> that contains the elements from both input sequences, excluding duplicates.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source1" /> or <paramref name="source2" /> is <see langword="null" />.</exception>
[DynamicDependency("UnionBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> UnionBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TSource> source2, Expression<Func<TSource, TKey>> keySelector)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.UnionBy_TSource_TKey_3(typeof(TSource), typeof(TKey)),
- source1.Expression, GetSourceExpression(source2), Expression.Quote(keySelector)
- ));
+ new Func<IQueryable<TSource>, IEnumerable<TSource>, Expression<Func<TSource, TKey>>, IQueryable<TSource>>(UnionBy).Method,
+ source1.Expression, GetSourceExpression(source2), Expression.Quote(keySelector)));
}
/// <summary>Produces the set union of two sequences according to a specified key selector function.</summary>
/// <returns>An <see cref="IQueryable{T}" /> that contains the elements from both input sequences, excluding duplicates.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source1" /> or <paramref name="source2" /> is <see langword="null" />.</exception>
[DynamicDependency("UnionBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> UnionBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TSource> source2, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.UnionBy_TSource_TKey_4(typeof(TSource), typeof(TKey)),
+ new Func<IQueryable<TSource>, IEnumerable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<TSource>>(UnionBy).Method,
source1.Expression,
GetSourceExpression(source2),
Expression.Quote(keySelector),
- Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))
- ));
+ Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
}
[DynamicDependency("Intersect`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Intersect<TSource>(this IQueryable<TSource> source1, IEnumerable<TSource> source2)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Intersect_TSource_2(typeof(TSource)),
- source1.Expression, GetSourceExpression(source2)
- ));
+ new Func<IQueryable<TSource>, IEnumerable<TSource>, IQueryable<TSource>>(Intersect).Method,
+ source1.Expression, GetSourceExpression(source2)));
}
[DynamicDependency("Intersect`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Intersect<TSource>(this IQueryable<TSource> source1, IEnumerable<TSource> source2, IEqualityComparer<TSource>? comparer)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Intersect_TSource_3(typeof(TSource)),
+ new Func<IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>, IQueryable<TSource>>(Intersect).Method,
source1.Expression,
GetSourceExpression(source2),
- Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))
- ));
+ Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
}
/// <summary>Produces the set intersection of two sequences according to a specified key selector function.</summary>
/// <returns>A sequence that contains the elements that form the set intersection of two sequences.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source1" /> or <paramref name="source2" /> is <see langword="null" />.</exception>
[DynamicDependency("IntersectBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> IntersectBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TKey> source2, Expression<Func<TSource, TKey>> keySelector)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.IntersectBy_TSource_TKey_3(typeof(TSource), typeof(TKey)),
+ new Func<IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource, TKey>>, IQueryable<TSource>>(IntersectBy).Method,
source1.Expression,
GetSourceExpression(source2),
- Expression.Quote(keySelector)
- ));
+ Expression.Quote(keySelector)));
}
/// <summary>Produces the set intersection of two sequences according to a specified key selector function.</summary>
/// <returns>A sequence that contains the elements that form the set intersection of two sequences.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source1" /> or <paramref name="source2" /> is <see langword="null" />.</exception>
[DynamicDependency("IntersectBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> IntersectBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TKey> source2, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.IntersectBy_TSource_TKey_4(typeof(TSource), typeof(TKey)),
+ new Func<IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<TSource>>(IntersectBy).Method,
source1.Expression,
GetSourceExpression(source2),
Expression.Quote(keySelector),
- Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))
- ));
+ Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
}
[DynamicDependency("Except`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Except<TSource>(this IQueryable<TSource> source1, IEnumerable<TSource> source2)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Except_TSource_2(typeof(TSource)),
- source1.Expression, GetSourceExpression(source2)
- ));
+ new Func<IQueryable<TSource>, IEnumerable<TSource>, IQueryable<TSource>>(Except).Method,
+ source1.Expression, GetSourceExpression(source2)));
}
[DynamicDependency("Except`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Except<TSource>(this IQueryable<TSource> source1, IEnumerable<TSource> source2, IEqualityComparer<TSource>? comparer)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Except_TSource_3(typeof(TSource)),
+ new Func<IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>, IQueryable<TSource>>(Except).Method,
source1.Expression,
GetSourceExpression(source2),
- Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))
- ));
+ Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
}
/// <summary>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <returns>A <see cref="IQueryable{TSource}" /> that contains the set difference of the elements of two sequences.</returns>
[DynamicDependency("ExceptBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> ExceptBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TKey> source2, Expression<Func<TSource, TKey>> keySelector)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.ExceptBy_TSource_TKey_3(typeof(TSource), typeof(TKey)),
+ new Func<IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource, TKey>>, IQueryable<TSource>>(ExceptBy).Method,
source1.Expression,
GetSourceExpression(source2),
- Expression.Quote(keySelector)
- ));
+ Expression.Quote(keySelector)));
}
/// <summary>
/// <param name="comparer">An <see cref="IEqualityComparer{TKey}" /> to compare keys.</param>
/// <returns>A <see cref="IQueryable{TSource}" /> that contains the set difference of the elements of two sequences.</returns>
[DynamicDependency("ExceptBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> ExceptBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TKey> source2, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.ExceptBy_TSource_TKey_4(typeof(TSource), typeof(TKey)),
+ new Func<IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<TSource>>(ExceptBy).Method,
source1.Expression,
GetSourceExpression(source2),
Expression.Quote(keySelector),
- Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))
- ));
+ Expression.Constant(comparer, typeof(IEqualityComparer<TKey>))));
}
[DynamicDependency("First`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource First<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.First_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, TSource>(First).Method,
+ source.Expression));
}
[DynamicDependency("First`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource First<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.First_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource>(First).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("FirstOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? FirstOrDefault<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.FirstOrDefault_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, TSource?>(FirstOrDefault).Method,
+ source.Expression));
}
/// <summary>Returns the first element of a sequence, or a default value if the sequence contains no elements.</summary>
/// <returns><paramref name="defaultValue" /> if <paramref name="source" /> is empty; otherwise, the first element in <paramref name="source" />.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
[DynamicDependency("FirstOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource FirstOrDefault<TSource>(this IQueryable<TSource> source, TSource defaultValue)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.FirstOrDefault_TSource_3(typeof(TSource)),
+ new Func<IQueryable<TSource>, TSource, TSource>(FirstOrDefault).Method,
source.Expression, Expression.Constant(defaultValue, typeof(TSource))));
}
[DynamicDependency("FirstOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? FirstOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.FirstOrDefault_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource?>(FirstOrDefault).Method,
+ source.Expression, Expression.Quote(predicate)));
}
/// <summary>Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.</summary>
/// <returns><paramref name="defaultValue" /> if <paramref name="source" /> is empty or if no element passes the test specified by <paramref name="predicate" />; otherwise, the first element in <paramref name="source" /> that passes the test specified by <paramref name="predicate" />.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source" /> or <paramref name="predicate" /> is <see langword="null" />.</exception>
[DynamicDependency("FirstOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource FirstOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, TSource defaultValue)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.FirstOrDefault_TSource_4(typeof(TSource)),
- source.Expression, Expression.Quote(predicate), Expression.Constant(defaultValue, typeof(TSource))
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource, TSource>(FirstOrDefault).Method,
+ source.Expression, Expression.Quote(predicate), Expression.Constant(defaultValue, typeof(TSource))));
}
[DynamicDependency("Last`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource Last<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Last_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, TSource>(Last).Method,
+ source.Expression));
}
[DynamicDependency("Last`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource Last<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Last_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource>(Last).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("LastOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? LastOrDefault<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.LastOrDefault_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, TSource?>(LastOrDefault).Method,
+ source.Expression));
}
/// <summary>Returns the last element of a sequence, or a default value if the sequence contains no elements.</summary>
/// <returns><paramref name="defaultValue" /> if the source sequence is empty; otherwise, the last element in the <see cref="IEnumerable{T}" />.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
[DynamicDependency("LastOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource LastOrDefault<TSource>(this IQueryable<TSource> source, TSource defaultValue)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.LastOrDefault_TSource_3(typeof(TSource)),
+ new Func<IQueryable<TSource>, TSource, TSource>(LastOrDefault).Method,
source.Expression, Expression.Constant(defaultValue, typeof(TSource))));
}
[DynamicDependency("LastOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? LastOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.LastOrDefault_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource?>(LastOrDefault).Method,
+ source.Expression, Expression.Quote(predicate)));
}
/// <summary>Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.</summary>
/// <returns><paramref name="defaultValue" /> if the sequence is empty or if no elements pass the test in the predicate function; otherwise, the last element that passes the test in the predicate function.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source" /> or <paramref name="predicate" /> is <see langword="null" />.</exception>
[DynamicDependency("LastOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource LastOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, TSource defaultValue)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.LastOrDefault_TSource_4(typeof(TSource)),
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource, TSource>(LastOrDefault).Method,
source.Expression, Expression.Quote(predicate), Expression.Constant(defaultValue, typeof(TSource))
));
}
[DynamicDependency("Single`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource Single<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Single_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, TSource>(Single).Method,
+ source.Expression));
}
[DynamicDependency("Single`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource Single<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Single_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource>(Single).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("SingleOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? SingleOrDefault<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.SingleOrDefault_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, TSource?>(SingleOrDefault).Method,
+ source.Expression));
}
/// <summary>Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.</summary>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
/// <exception cref="InvalidOperationException">The input sequence contains more than one element.</exception>
[DynamicDependency("SingleOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource SingleOrDefault<TSource>(this IQueryable<TSource> source, TSource defaultValue)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.SingleOrDefault_TSource_3(typeof(TSource)),
+ new Func<IQueryable<TSource>, TSource, TSource>(SingleOrDefault).Method,
source.Expression, Expression.Constant(defaultValue, typeof(TSource))));
}
[DynamicDependency("SingleOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? SingleOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.SingleOrDefault_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource?>(SingleOrDefault).Method,
+ source.Expression, Expression.Quote(predicate)));
}
/// <summary>Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.</summary>
/// <exception cref="ArgumentNullException"><paramref name="source" /> or <paramref name="predicate" /> is <see langword="null" />.</exception>
/// <exception cref="InvalidOperationException">More than one element satisfies the condition in <paramref name="predicate" />.</exception>
[DynamicDependency("SingleOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource SingleOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, TSource defaultValue)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.SingleOrDefault_TSource_4(typeof(TSource)),
- source.Expression, Expression.Quote(predicate), Expression.Constant(defaultValue, typeof(TSource))
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource, TSource>(SingleOrDefault).Method,
+ source.Expression, Expression.Quote(predicate), Expression.Constant(defaultValue, typeof(TSource))));
}
[DynamicDependency("ElementAt`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource ElementAt<TSource>(this IQueryable<TSource> source, int index)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.ElementAt_Int32_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(index)
- ));
+ new Func<IQueryable<TSource>, int, TSource>(ElementAt).Method,
+ source.Expression, Expression.Constant(index)));
}
/// <summary>Returns the element at a specified index in a sequence.</summary>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> is outside the bounds of the <paramref name="source" /> sequence.</exception>
/// <returns>The element at the specified position in the <paramref name="source" /> sequence.</returns>
[DynamicDependency("ElementAt`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource ElementAt<TSource>(this IQueryable<TSource> source, Index index)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.ElementAt_Index_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(index)
- ));
+ new Func<IQueryable<TSource>, Index, TSource>(ElementAt).Method,
+ source.Expression, Expression.Constant(index)));
}
[DynamicDependency("ElementAtOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? ElementAtOrDefault<TSource>(this IQueryable<TSource> source, int index)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.ElementAtOrDefault_Int32_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(index)
- ));
+ new Func<IQueryable<TSource>, int, TSource?>(ElementAtOrDefault).Method,
+ source.Expression, Expression.Constant(index)));
}
/// <summary>Returns the element at a specified index in a sequence or a default value if the index is out of range.</summary>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
/// <returns><see langword="default" /> if <paramref name="index" /> is outside the bounds of the <paramref name="source" /> sequence; otherwise, the element at the specified position in the <paramref name="source" /> sequence.</returns>
[DynamicDependency("ElementAtOrDefault`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? ElementAtOrDefault<TSource>(this IQueryable<TSource> source, Index index)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.ElementAtOrDefault_Index_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(index)
- ));
+ new Func<IQueryable<TSource>, Index, TSource?>(ElementAtOrDefault).Method,
+ source.Expression, Expression.Constant(index)));
}
[DynamicDependency("DefaultIfEmpty`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource?> DefaultIfEmpty<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.DefaultIfEmpty_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, IQueryable<TSource?>>(DefaultIfEmpty).Method,
+ source.Expression));
}
[DynamicDependency("DefaultIfEmpty`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> DefaultIfEmpty<TSource>(this IQueryable<TSource> source, TSource defaultValue)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.DefaultIfEmpty_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(defaultValue, typeof(TSource))
- ));
+ new Func<IQueryable<TSource>, TSource, IQueryable<TSource?>>(DefaultIfEmpty).Method,
+ source.Expression, Expression.Constant(defaultValue, typeof(TSource))));
}
[DynamicDependency("Contains`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static bool Contains<TSource>(this IQueryable<TSource> source, TSource item)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<bool>(
Expression.Call(
null,
- CachedReflectionInfo.Contains_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(item, typeof(TSource))
- ));
+ new Func<IQueryable<TSource>, TSource, bool>(Contains).Method,
+ source.Expression, Expression.Constant(item, typeof(TSource))));
}
[DynamicDependency("Contains`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static bool Contains<TSource>(this IQueryable<TSource> source, TSource item, IEqualityComparer<TSource>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<bool>(
Expression.Call(
null,
- CachedReflectionInfo.Contains_TSource_3(typeof(TSource)),
- source.Expression, Expression.Constant(item, typeof(TSource)), Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))
- ));
+ new Func<IQueryable<TSource>, TSource, IEqualityComparer<TSource>, bool>(Contains).Method,
+ source.Expression, Expression.Constant(item, typeof(TSource)), Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
}
[DynamicDependency("Reverse`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Reverse<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Reverse_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, IQueryable<TSource>>(Reverse).Method,
+ source.Expression));
}
[DynamicDependency("SequenceEqual`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static bool SequenceEqual<TSource>(this IQueryable<TSource> source1, IEnumerable<TSource> source2)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.Execute<bool>(
Expression.Call(
null,
- CachedReflectionInfo.SequenceEqual_TSource_2(typeof(TSource)),
- source1.Expression, GetSourceExpression(source2)
- ));
+ new Func<IQueryable<TSource>, IEnumerable<TSource>, bool>(SequenceEqual).Method,
+ source1.Expression, GetSourceExpression(source2)));
}
[DynamicDependency("SequenceEqual`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static bool SequenceEqual<TSource>(this IQueryable<TSource> source1, IEnumerable<TSource> source2, IEqualityComparer<TSource>? comparer)
{
ArgumentNullException.ThrowIfNull(source1);
return source1.Provider.Execute<bool>(
Expression.Call(
null,
- CachedReflectionInfo.SequenceEqual_TSource_3(typeof(TSource)),
+ new Func<IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>, bool>(SequenceEqual).Method,
source1.Expression,
GetSourceExpression(source2),
- Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))
- ));
+ Expression.Constant(comparer, typeof(IEqualityComparer<TSource>))));
}
[DynamicDependency("Any`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static bool Any<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<bool>(
Expression.Call(
null,
- CachedReflectionInfo.Any_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, bool>(Any).Method,
+ source.Expression));
}
[DynamicDependency("Any`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static bool Any<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<bool>(
Expression.Call(
null,
- CachedReflectionInfo.Any_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, bool>(Any).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("All`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static bool All<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<bool>(
Expression.Call(
null,
- CachedReflectionInfo.All_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, bool>(All).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("Count`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static int Count<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<int>(
Expression.Call(
null,
- CachedReflectionInfo.Count_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, int>(Count).Method,
+ source.Expression));
}
[DynamicDependency("Count`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static int Count<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<int>(
Expression.Call(
null,
- CachedReflectionInfo.Count_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, int>(Count).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("LongCount`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static long LongCount<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<long>(
Expression.Call(
null,
- CachedReflectionInfo.LongCount_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, long>(LongCount).Method,
+ source.Expression));
}
[DynamicDependency("LongCount`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static long LongCount<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<long>(
Expression.Call(
null,
- CachedReflectionInfo.LongCount_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(predicate)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, long>(LongCount).Method,
+ source.Expression, Expression.Quote(predicate)));
}
[DynamicDependency("Min`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? Min<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Min_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, TSource?>(Min).Method,
+ source.Expression));
}
/// <summary>Returns the minimum value in a generic <see cref="System.Linq.IQueryable{T}" />.</summary>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="System.IComparable" /> or <see cref="System.IComparable{T}" /> interface.</exception>
[DynamicDependency("Min`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? Min<TSource>(this IQueryable<TSource> source, IComparer<TSource>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Min_TSource_2(typeof(TSource)),
+ new Func<IQueryable<TSource>, IComparer<TSource>, TSource?>(Min).Method,
source.Expression,
- Expression.Constant(comparer, typeof(IComparer<TSource>))
- ));
+ Expression.Constant(comparer, typeof(IComparer<TSource>))));
}
[DynamicDependency("Min`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TResult? Min<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TResult>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.Min_TSource_TResult_2(typeof(TSource), typeof(TResult)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TResult>>, TResult?>(Min).Method,
+ source.Expression, Expression.Quote(selector)));
}
/// <summary>Returns the minimum value in a generic <see cref="IQueryable{T}"/> according to a specified key selector function.</summary>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
[DynamicDependency("MinBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? MinBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.MinBy_TSource_TKey_2(typeof(TSource), typeof(TKey)),
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, TSource?>(MinBy).Method,
source.Expression,
- Expression.Quote(keySelector)
- ));
+ Expression.Quote(keySelector)));
}
/// <summary>Returns the minimum value in a generic <see cref="IQueryable{T}"/> according to a specified key selector function.</summary>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
[DynamicDependency("MinBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? MinBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TSource>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.MinBy_TSource_TKey_3(typeof(TSource), typeof(TKey)),
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TSource>, TSource?>(MinBy).Method,
source.Expression,
Expression.Quote(keySelector),
- Expression.Constant(comparer, typeof(IComparer<TSource>))
- ));
+ Expression.Constant(comparer, typeof(IComparer<TSource>))));
}
[DynamicDependency("Max`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? Max<TSource>(this IQueryable<TSource> source)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Max_TSource_1(typeof(TSource)), source.Expression));
+ new Func<IQueryable<TSource>, TSource?>(Max).Method,
+ source.Expression));
}
/// <summary>Returns the maximum value in a generic <see cref="System.Linq.IQueryable{T}" />.</summary>
/// <returns>The maximum value in the sequence.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
[DynamicDependency("Max`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? Max<TSource>(this IQueryable<TSource> source, IComparer<TSource>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Max_TSource_2(typeof(TSource)),
+ new Func<IQueryable<TSource>, IComparer<TSource>, TSource?>(Max).Method,
source.Expression,
- Expression.Constant(comparer, typeof(IComparer<TSource>))
- ));
+ Expression.Constant(comparer, typeof(IComparer<TSource>))));
}
[DynamicDependency("Max`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TResult? Max<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TResult>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.Max_TSource_TResult_2(typeof(TSource), typeof(TResult)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TResult>>, TResult?>(Max).Method,
+ source.Expression, Expression.Quote(selector)));
}
/// <summary>Returns the maximum value in a generic <see cref="IQueryable{T}"/> according to a specified key selector function.</summary>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
[DynamicDependency("MaxBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? MaxBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.MaxBy_TSource_TKey_2(typeof(TSource), typeof(TKey)),
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, TSource?>(MaxBy).Method,
source.Expression,
- Expression.Quote(keySelector)
- ));
+ Expression.Quote(keySelector)));
}
/// <summary>Returns the maximum value in a generic <see cref="IQueryable{T}"/> according to a specified key selector function.</summary>
/// <exception cref="ArgumentNullException"><paramref name="source" /> is <see langword="null" />.</exception>
/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
[DynamicDependency("MaxBy`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource? MaxBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TSource>? comparer)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.MaxBy_TSource_TKey_3(typeof(TSource), typeof(TKey)),
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TSource>, TSource?>(MaxBy).Method,
source.Expression,
Expression.Quote(keySelector),
- Expression.Constant(comparer, typeof(IComparer<TSource>))
- ));
+ Expression.Constant(comparer, typeof(IComparer<TSource>))));
}
[DynamicDependency("Sum", typeof(Enumerable))]
return source.Provider.Execute<int>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_Int32_1, source.Expression));
+ new Func<IQueryable<int>, int>(Sum).Method,
+ source.Expression));
}
[DynamicDependency("Sum", typeof(Enumerable))]
return source.Provider.Execute<int?>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_NullableInt32_1, source.Expression));
+ new Func<IQueryable<int?>, int?>(Sum).Method,
+ source.Expression));
}
[DynamicDependency("Sum", typeof(Enumerable))]
return source.Provider.Execute<long>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_Int64_1, source.Expression));
+ new Func<IQueryable<long>, long>(Sum).Method,
+ source.Expression));
}
[DynamicDependency("Sum", typeof(Enumerable))]
return source.Provider.Execute<long?>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_NullableInt64_1, source.Expression));
+ new Func<IQueryable<long?>, long?>(Sum).Method,
+ source.Expression));
}
[DynamicDependency("Sum", typeof(Enumerable))]
return source.Provider.Execute<float>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_Single_1, source.Expression));
+ new Func<IQueryable<float>, float>(Sum).Method,
+ source.Expression));
}
[DynamicDependency("Sum", typeof(Enumerable))]
return source.Provider.Execute<float?>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_NullableSingle_1, source.Expression));
+ new Func<IQueryable<float?>, float?>(Sum).Method,
+ source.Expression));
}
[DynamicDependency("Sum", typeof(Enumerable))]
return source.Provider.Execute<double>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_Double_1, source.Expression));
+ new Func<IQueryable<double>, double>(Sum).Method,
+ source.Expression));
}
[DynamicDependency("Sum", typeof(Enumerable))]
return source.Provider.Execute<double?>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_NullableDouble_1, source.Expression));
+ new Func<IQueryable<double?>, double?>(Sum).Method,
+ source.Expression));
}
[DynamicDependency("Sum", typeof(Enumerable))]
return source.Provider.Execute<decimal>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_Decimal_1, source.Expression));
+ new Func<IQueryable<decimal>, decimal>(Sum).Method,
+ source.Expression));
}
[DynamicDependency("Sum", typeof(Enumerable))]
return source.Provider.Execute<decimal?>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_NullableDecimal_1, source.Expression));
+ new Func<IQueryable<decimal?>, decimal?>(Sum).Method,
+ source.Expression));
}
[DynamicDependency("Sum`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static int Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<int>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_Int32_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, int>>, int>(Sum).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Sum`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static int? Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int?>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<int?>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_NullableInt32_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, int?>>, int?>(Sum).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Sum`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static long Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, long>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<long>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_Int64_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, long>>, long>(Sum).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Sum`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static long? Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, long?>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<long?>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_NullableInt64_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, long?>>, long?>(Sum).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Sum`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static float Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, float>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<float>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_Single_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, float>>, float>(Sum).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Sum`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static float? Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, float?>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<float?>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_NullableSingle_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, float?>>, float?>(Sum).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Sum`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static double Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, double>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<double>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_Double_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, double>>, double>(Sum).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Sum`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static double? Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, double?>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<double?>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_NullableDouble_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, double?>>, double?>(Sum).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Sum`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static decimal Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, decimal>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<decimal>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_Decimal_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, decimal>>, decimal>(Sum).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Sum`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static decimal? Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<decimal?>(
Expression.Call(
null,
- CachedReflectionInfo.Sum_NullableDecimal_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, decimal?>>, decimal?>(Sum).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Average", typeof(Enumerable))]
return source.Provider.Execute<double>(
Expression.Call(
null,
- CachedReflectionInfo.Average_Int32_1, source.Expression));
+ new Func<IQueryable<int>, double>(Average).Method,
+ source.Expression));
}
[DynamicDependency("Average", typeof(Enumerable))]
return source.Provider.Execute<double?>(
Expression.Call(
null,
- CachedReflectionInfo.Average_NullableInt32_1, source.Expression));
+ new Func<IQueryable<int?>, double?>(Average).Method,
+ source.Expression));
}
[DynamicDependency("Average", typeof(Enumerable))]
return source.Provider.Execute<double>(
Expression.Call(
null,
- CachedReflectionInfo.Average_Int64_1, source.Expression));
+ new Func<IQueryable<long>, double>(Average).Method,
+ source.Expression));
}
[DynamicDependency("Average", typeof(Enumerable))]
return source.Provider.Execute<double?>(
Expression.Call(
null,
- CachedReflectionInfo.Average_NullableInt64_1, source.Expression));
+ new Func<IQueryable<long?>, double?>(Average).Method,
+ source.Expression));
}
[DynamicDependency("Average", typeof(Enumerable))]
return source.Provider.Execute<float>(
Expression.Call(
null,
- CachedReflectionInfo.Average_Single_1, source.Expression));
+ new Func<IQueryable<float>, float>(Average).Method,
+ source.Expression));
}
[DynamicDependency("Average", typeof(Enumerable))]
return source.Provider.Execute<float?>(
Expression.Call(
null,
- CachedReflectionInfo.Average_NullableSingle_1, source.Expression));
+ new Func<IQueryable<float?>, float?>(Average).Method,
+ source.Expression));
}
[DynamicDependency("Average", typeof(Enumerable))]
return source.Provider.Execute<double>(
Expression.Call(
null,
- CachedReflectionInfo.Average_Double_1, source.Expression));
+ new Func<IQueryable<double>, double>(Average).Method,
+ source.Expression));
}
[DynamicDependency("Average", typeof(Enumerable))]
return source.Provider.Execute<double?>(
Expression.Call(
null,
- CachedReflectionInfo.Average_NullableDouble_1, source.Expression));
+ new Func<IQueryable<double?>, double?>(Average).Method,
+ source.Expression));
}
[DynamicDependency("Average", typeof(Enumerable))]
return source.Provider.Execute<decimal>(
Expression.Call(
null,
- CachedReflectionInfo.Average_Decimal_1, source.Expression));
+ new Func<IQueryable<decimal>, decimal>(Average).Method,
+ source.Expression));
}
[DynamicDependency("Average", typeof(Enumerable))]
return source.Provider.Execute<decimal?>(
Expression.Call(
null,
- CachedReflectionInfo.Average_NullableDecimal_1, source.Expression));
+ new Func<IQueryable<decimal?>, decimal?>(Average).Method,
+ source.Expression));
}
[DynamicDependency("Average`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static double Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<double>(
Expression.Call(
null,
- CachedReflectionInfo.Average_Int32_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, int>>, double>(Average).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Average`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static double? Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int?>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<double?>(
Expression.Call(
null,
- CachedReflectionInfo.Average_NullableInt32_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, int?>>, double?>(Average).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Average`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static float Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, float>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<float>(
Expression.Call(
null,
- CachedReflectionInfo.Average_Single_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, float>>, float>(Average).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Average`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static float? Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, float?>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<float?>(
Expression.Call(
null,
- CachedReflectionInfo.Average_NullableSingle_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, float?>>, float?>(Average).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Average`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static double Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, long>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<double>(
Expression.Call(
null,
- CachedReflectionInfo.Average_Int64_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, long>>, double>(Average).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Average`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static double? Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, long?>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<double?>(
Expression.Call(
null,
- CachedReflectionInfo.Average_NullableInt64_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, long?>>, double?>(Average).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Average`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static double Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, double>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<double>(
Expression.Call(
null,
- CachedReflectionInfo.Average_Double_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, double>>, double>(Average).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Average`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static double? Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, double?>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<double?>(
Expression.Call(
null,
- CachedReflectionInfo.Average_NullableDouble_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, double?>>, double?>(Average).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Average`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static decimal Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, decimal>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<decimal>(
Expression.Call(
null,
- CachedReflectionInfo.Average_Decimal_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, decimal>>, decimal>(Average).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Average`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static decimal? Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<decimal?>(
Expression.Call(
null,
- CachedReflectionInfo.Average_NullableDecimal_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(selector)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, decimal?>>, decimal?>(Average).Method,
+ source.Expression, Expression.Quote(selector)));
}
[DynamicDependency("Aggregate`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TSource Aggregate<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, TSource, TSource>> func)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Aggregate_TSource_2(typeof(TSource)),
- source.Expression, Expression.Quote(func)
- ));
+ new Func<IQueryable<TSource>, Expression<Func<TSource, TSource, TSource>>, TSource>(Aggregate).Method,
+ source.Expression, Expression.Quote(func)));
}
[DynamicDependency("Aggregate`2", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TAccumulate Aggregate<TSource, TAccumulate>(this IQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TAccumulate>(
Expression.Call(
null,
- CachedReflectionInfo.Aggregate_TSource_TAccumulate_3(typeof(TSource), typeof(TAccumulate)),
- source.Expression, Expression.Constant(seed), Expression.Quote(func)
- ));
+ new Func<IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, TAccumulate>(Aggregate).Method,
+ source.Expression, Expression.Constant(seed), Expression.Quote(func)));
}
[DynamicDependency("Aggregate`3", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static TResult Aggregate<TSource, TAccumulate, TResult>(this IQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func, Expression<Func<TAccumulate, TResult>> selector)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.Execute<TResult>(
Expression.Call(
null,
- CachedReflectionInfo.Aggregate_TSource_TAccumulate_TResult_4(typeof(TSource), typeof(TAccumulate), typeof(TResult)), source.Expression, Expression.Constant(seed), Expression.Quote(func), Expression.Quote(selector)));
+ new Func<IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, Expression<Func<TAccumulate, TResult>>, TResult>(Aggregate).Method,
+ source.Expression, Expression.Constant(seed), Expression.Quote(func), Expression.Quote(selector)));
}
[DynamicDependency("SkipLast`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> SkipLast<TSource>(this IQueryable<TSource> source, int count)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.SkipLast_TSource_2(typeof(TSource)),
+ new Func<IQueryable<TSource>, int, IQueryable<TSource>>(SkipLast).Method,
source.Expression, Expression.Constant(count)
));
}
[DynamicDependency("TakeLast`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> TakeLast<TSource>(this IQueryable<TSource> source, int count)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.TakeLast_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(count)
- ));
+ new Func<IQueryable<TSource>, int, IQueryable<TSource>>(TakeLast).Method,
+ source.Expression, Expression.Constant(count)));
}
[DynamicDependency("Append`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Append<TSource>(this IQueryable<TSource> source, TSource element)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Append_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(element)
- ));
+ new Func<IQueryable<TSource>, TSource, IQueryable<TSource>>(Append).Method,
+ source.Expression, Expression.Constant(element)));
}
[DynamicDependency("Prepend`1", typeof(Enumerable))]
- [RequiresDynamicCode(InMemoryQueryableExtensionMethodsRequiresDynamicCode)]
public static IQueryable<TSource> Prepend<TSource>(this IQueryable<TSource> source, TSource element)
{
ArgumentNullException.ThrowIfNull(source);
return source.Provider.CreateQuery<TSource>(
Expression.Call(
null,
- CachedReflectionInfo.Prepend_TSource_2(typeof(TSource)),
- source.Expression, Expression.Constant(element)
- ));
+ new Func<IQueryable<TSource>, TSource, IQueryable<TSource>>(Prepend).Method,
+ source.Expression, Expression.Constant(element)));
}
}
}
[Fact]
public void Aggregate1()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Aggregate((n1, n2) => n1 + n2);
+ var val = new[] { 0, 2, 1 }.AsQueryable().Aggregate((n1, n2) => n1 + n2);
Assert.Equal((int)3, val);
}
[Fact]
public void Aggregate2()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Aggregate("", (n1, n2) => n1 + n2.ToString());
+ var val = new[] { 0, 2, 1 }.AsQueryable().Aggregate("", (n1, n2) => n1 + n2.ToString());
Assert.Equal("021", val);
}
[Fact]
public void Aggregate3()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Aggregate(0L, (n1, n2) => n1 + n2, n => n.ToString());
+ var val = new[] { 0, 2, 1 }.AsQueryable().Aggregate(0L, (n1, n2) => n1 + n2, n => n.ToString());
Assert.Equal("3", val);
}
}
[Fact]
public void All()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().All(n => n > 1);
+ var val = new[] { 0, 2, 1 }.AsQueryable().All(n => n > 1);
Assert.False(val);
}
}
[Fact]
public void Any1()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Any();
+ var val = new[] { 0, 2, 1 }.AsQueryable().Any();
Assert.True(val);
}
[Fact]
public void Any2()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Any(n => n > 1);
+ var val = new[] { 0, 2, 1 }.AsQueryable().Any(n => n > 1);
Assert.True(val);
}
}
[Fact]
public void Average1()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Average();
+ var val = new[] { 0, 2, 1 }.AsQueryable().Average();
Assert.Equal((double)1, val);
}
[Fact]
public void Average2()
{
- var val = (new int?[] { 0, 2, 1 }).AsQueryable().Average();
+ var val = new int?[] { 0, 2, 1 }.AsQueryable().Average();
Assert.Equal((double)1, val);
}
[Fact]
public void Average3()
{
- var val = (new long[] { 0, 2, 1 }).AsQueryable().Average();
+ var val = new long[] { 0, 2, 1 }.AsQueryable().Average();
Assert.Equal((double)1, val);
}
[Fact]
public void Average4()
{
- var val = (new long?[] { 0, 2, 1 }).AsQueryable().Average();
+ var val = new long?[] { 0, 2, 1 }.AsQueryable().Average();
Assert.Equal((double)1, val);
}
[Fact]
public void Average5()
{
- var val = (new float[] { 0, 2, 1 }).AsQueryable().Average();
+ var val = new float[] { 0, 2, 1 }.AsQueryable().Average();
Assert.Equal((float)1, val);
}
[Fact]
public void Average6()
{
- var val = (new float?[] { 0, 2, 1 }).AsQueryable().Average();
+ var val = new float?[] { 0, 2, 1 }.AsQueryable().Average();
Assert.Equal((float)1, val);
}
[Fact]
public void Average7()
{
- var val = (new double[] { 0, 2, 1 }).AsQueryable().Average();
+ var val = new double[] { 0, 2, 1 }.AsQueryable().Average();
Assert.Equal((double)1, val);
}
[Fact]
public void Average8()
{
- var val = (new double?[] { 0, 2, 1 }).AsQueryable().Average();
+ var val = new double?[] { 0, 2, 1 }.AsQueryable().Average();
Assert.Equal((double)1, val);
}
[Fact]
public void Average9()
{
- var val = (new decimal[] { 0, 2, 1 }).AsQueryable().Average();
+ var val = new decimal[] { 0, 2, 1 }.AsQueryable().Average();
Assert.Equal((decimal)1, val);
}
[Fact]
public void Average10()
{
- var val = (new decimal?[] { 0, 2, 1 }).AsQueryable().Average();
+ var val = new decimal?[] { 0, 2, 1 }.AsQueryable().Average();
Assert.Equal((decimal)1, val);
}
[Fact]
public void Average11()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Average(n => n);
+ var val = new[] { 0, 2, 1 }.AsQueryable().Average(n => n);
Assert.Equal((double)1, val);
}
[Fact]
public void Average12()
{
- var val = (new int?[] { 0, 2, 1 }).AsQueryable().Average(n => n);
+ var val = new int?[] { 0, 2, 1 }.AsQueryable().Average(n => n);
Assert.Equal((double)1, val);
}
[Fact]
public void Average13()
{
- var val = (new long[] { 0, 2, 1 }).AsQueryable().Average(n => n);
+ var val = new long[] { 0, 2, 1 }.AsQueryable().Average(n => n);
Assert.Equal((double)1, val);
}
[Fact]
public void Average14()
{
- var val = (new long?[] { 0, 2, 1 }).AsQueryable().Average(n => n);
+ var val = new long?[] { 0, 2, 1 }.AsQueryable().Average(n => n);
Assert.Equal((double)1, val);
}
[Fact]
public void Average15()
{
- var val = (new float[] { 0, 2, 1 }).AsQueryable().Average(n => n);
+ var val = new float[] { 0, 2, 1 }.AsQueryable().Average(n => n);
Assert.Equal((float)1, val);
}
[Fact]
public void Average16()
{
- var val = (new float?[] { 0, 2, 1 }).AsQueryable().Average(n => n);
+ var val = new float?[] { 0, 2, 1 }.AsQueryable().Average(n => n);
Assert.Equal((float)1, val);
}
[Fact]
public void Average17()
{
- var val = (new double[] { 0, 2, 1 }).AsQueryable().Average(n => n);
+ var val = new double[] { 0, 2, 1 }.AsQueryable().Average(n => n);
Assert.Equal((double)1, val);
}
[Fact]
public void Average18()
{
- var val = (new double?[] { 0, 2, 1 }).AsQueryable().Average(n => n);
+ var val = new double?[] { 0, 2, 1 }.AsQueryable().Average(n => n);
Assert.Equal((double)1, val);
}
[Fact]
public void Average19()
{
- var val = (new decimal[] { 0, 2, 1 }).AsQueryable().Average(n => n);
+ var val = new decimal[] { 0, 2, 1 }.AsQueryable().Average(n => n);
Assert.Equal((decimal)1, val);
}
[Fact]
public void Average20()
{
- var val = (new decimal?[] { 0, 2, 1 }).AsQueryable().Average(n => n);
+ var val = new decimal?[] { 0, 2, 1 }.AsQueryable().Average(n => n);
Assert.Equal((decimal)1, val);
}
}
[Fact]
public void ThrowCastingIntToDouble()
{
- int[] source = new int[] { -4, 1, 2, 9 };
+ int[] source = { -4, 1, 2, 9 };
IQueryable<double> cast = source.AsQueryable().Cast<double>();
Assert.Throws<InvalidCastException>(() => cast.ToList());
[Fact]
public void ThrowCastingIntToLong()
{
- int[] source = new int[] { -4, 1, 2, 3, 9 };
+ int[] source = { -4, 1, 2, 3, 9 };
IQueryable<long> cast = source.AsQueryable().Cast<long>();
Assert.Throws<InvalidCastException>(() => cast.ToList());
[Fact]
public void ThrowCastingIntToNullableLong()
{
- int[] source = new int[] { -4, 1, 2, 3, 9 };
+ int[] source = { -4, 1, 2, 3, 9 };
IQueryable<long?> cast = source.AsQueryable().Cast<long?>();
Assert.Throws<InvalidCastException>(() => cast.ToList());
[Fact]
public void ThrowCastingNullableIntToLong()
{
- int?[] source = new int?[] { -4, 1, 2, 3, 9 };
+ int?[] source = { -4, 1, 2, 3, 9 };
IQueryable<long> cast = source.AsQueryable().Cast<long>();
Assert.Throws<InvalidCastException>(() => cast.ToList());
[Fact]
public void ThrowCastingNullableIntToNullableLong()
{
- int?[] source = new int?[] { -4, 1, 2, 3, 9, null };
+ int?[] source = { -4, 1, 2, 3, 9, null };
IQueryable<long?> cast = source.AsQueryable().Cast<long?>();
Assert.Throws<InvalidCastException>(() => cast.ToList());
[Fact]
public void CastingNullToNonnullableIsNullReferenceException()
{
- int?[] source = new int?[] { -4, 1, null, 3 };
+ int?[] source = { -4, 1, null, 3 };
IQueryable<int> cast = source.AsQueryable().Cast<int>();
Assert.Throws<NullReferenceException>(() => cast.ToList());
}
[Fact]
public void Cast()
{
- var count = (new object[] { 0, 1, 2 }).AsQueryable().Cast<int>().Count();
+ var count = new object[] { 0, 1, 2 }.AsQueryable().Cast<int>().Count();
Assert.Equal(3, count);
}
}
[Fact]
public void Concat()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Concat((new int[] { 10, 11, 12 }).AsQueryable()).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Concat(new[] { 10, 11, 12 }.AsQueryable()).Count();
Assert.Equal(6, count);
}
}
[Fact]
public void Contains1()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Contains(1);
+ var val = new[] { 0, 2, 1 }.AsQueryable().Contains(1);
Assert.True(val);
}
[Fact]
public void Contains2()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Contains(1, EqualityComparer<int>.Default);
+ var val = new[] { 0, 2, 1 }.AsQueryable().Contains(1, EqualityComparer<int>.Default);
Assert.True(val);
}
}
[Fact]
public void Count1()
{
- var count = (new int[] { 0 }).AsQueryable().Count();
+ var count = new[] { 0 }.AsQueryable().Count();
Assert.Equal(1, count);
}
[Fact]
public void Count2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Count(n => n > 0);
+ var count = new[] { 0, 1, 2 }.AsQueryable().Count(n => n > 0);
Assert.Equal(2, count);
}
}
[Fact]
public void DefaultIfEmpty1()
{
- var count = (new int[] { }).AsQueryable().DefaultIfEmpty().Count();
+ var count = new int[] { }.AsQueryable().DefaultIfEmpty().Count();
Assert.Equal(1, count);
}
[Fact]
public void DefaultIfEmpty2()
{
- var count = (new int[] { }).AsQueryable().DefaultIfEmpty(3).Count();
+ var count = new int[] { }.AsQueryable().DefaultIfEmpty(3).Count();
Assert.Equal(1, count);
}
[Fact]
public void Distinct1()
{
- var count = (new int[] { 0, 1, 2, 2, 0 }).AsQueryable().Distinct().Count();
+ var count = new[] { 0, 1, 2, 2, 0 }.AsQueryable().Distinct().Count();
Assert.Equal(3, count);
}
[Fact]
public void Distinct2()
{
- var count = (new int[] { 0, 1, 2, 2, 0 }).AsQueryable().Distinct(EqualityComparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2, 2, 0 }.AsQueryable().Distinct(EqualityComparer<int>.Default).Count();
Assert.Equal(3, count);
}
public void WrapsEnumerableInExpression()
{
int[] source = { 1, 2, 3 };
- IQueryable<int> query = (source).AsQueryable();
+ IQueryable<int> query = source.AsQueryable();
var exp = (ConstantExpression)query.Expression;
Assert.Equal(source, (IEnumerable<int>)exp.Value);
}
[Fact]
public void Except1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Except((new int[] { 1, 2, 3 }).AsQueryable()).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Except(new[] { 1, 2, 3 }.AsQueryable()).Count();
Assert.Equal(1, count);
}
[Fact]
public void Except2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Except((new int[] { 1, 2, 3 }).AsQueryable(), EqualityComparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Except(new[] { 1, 2, 3 }.AsQueryable(), EqualityComparer<int>.Default).Count();
Assert.Equal(1, count);
}
[Fact]
public void FirstOrDefault1()
{
- var val = (new int[] { 1, 2 }).AsQueryable().FirstOrDefault();
+ var val = new[] { 1, 2 }.AsQueryable().FirstOrDefault();
Assert.Equal(1, val);
}
[Fact]
public void FirstOrDefault2()
{
- var val = (new int[] { 0, 1, 2 }).AsQueryable().FirstOrDefault(n => n > 1);
+ var val = new[] { 0, 1, 2 }.AsQueryable().FirstOrDefault(n => n > 1);
Assert.Equal(2, val);
}
[Fact]
public void First1()
{
- var val = (new int[] { 1, 2 }).AsQueryable().First();
+ var val = new[] { 1, 2 }.AsQueryable().First();
Assert.Equal(1, val);
}
[Fact]
public void First2()
{
- var val = (new int[] { 0, 1, 2 }).AsQueryable().First(n => n > 1);
+ var val = new[] { 0, 1, 2 }.AsQueryable().First(n => n > 1);
Assert.Equal(2, val);
}
}
[Fact]
public void KeySelectorNull()
{
- Record[] source = new[]
- {
+ Record[] source = {
new Record { Name = "Tim", Score = 55 },
new Record { Name = "Chris", Score = 49 },
new Record { Name = "Robert", Score = -100 },
[Fact]
public void ElementSelectorNull()
{
- Record[] source = new[]
- {
+ Record[] source = {
new Record { Name = "Tim", Score = 55 },
new Record { Name = "Chris", Score = 49 },
new Record { Name = "Robert", Score = -100 },
[Fact]
public void GroupBy1()
{
- var count = (new int[] { 0, 1, 2, 2, 0 }).AsQueryable().GroupBy(n => n).Count();
+ var count = new[] { 0, 1, 2, 2, 0 }.AsQueryable().GroupBy(n => n).Count();
Assert.Equal(3, count);
}
[Fact]
public void GroupBy2()
{
- var count = (new int[] { 0, 1, 2, 2, 0 }).AsQueryable().GroupBy(n => n, EqualityComparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2, 2, 0 }.AsQueryable().GroupBy(n => n, EqualityComparer<int>.Default).Count();
Assert.Equal(3, count);
}
[Fact]
public void GroupBy3()
{
- var count = (new int[] { 0, 1, 2, 2, 0 }).AsQueryable().GroupBy(n => n, n => n).Count();
+ var count = new[] { 0, 1, 2, 2, 0 }.AsQueryable().GroupBy(n => n, n => n).Count();
Assert.Equal(3, count);
}
[Fact]
public void GroupBy4()
{
- var count = (new int[] { 0, 1, 2, 2, 0 }).AsQueryable().GroupBy(n => n, n => n, EqualityComparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2, 2, 0 }.AsQueryable().GroupBy(n => n, n => n, EqualityComparer<int>.Default).Count();
Assert.Equal(3, count);
}
[Fact]
public void GroupBy5()
{
- var count = (new int[] { 0, 1, 2, 2, 0 }).AsQueryable().GroupBy(n => n, n => n, (k, g) => k).Count();
+ var count = new[] { 0, 1, 2, 2, 0 }.AsQueryable().GroupBy(n => n, n => n, (k, g) => k).Count();
Assert.Equal(3, count);
}
[Fact]
public void GroupBy6()
{
- var count = (new int[] { 0, 1, 2, 2, 0 }).AsQueryable().GroupBy(n => n, (k, g) => k).Count();
+ var count = new[] { 0, 1, 2, 2, 0 }.AsQueryable().GroupBy(n => n, (k, g) => k).Count();
Assert.Equal(3, count);
}
[Fact]
public void GroupBy7()
{
- var count = (new int[] { 0, 1, 2, 2, 0 }).AsQueryable().GroupBy(n => n, n => n, (k, g) => k, EqualityComparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2, 2, 0 }.AsQueryable().GroupBy(n => n, n => n, (k, g) => k, EqualityComparer<int>.Default).Count();
Assert.Equal(3, count);
}
[Fact]
public void GroupBy8()
{
- var count = (new int[] { 0, 1, 2, 2, 0 }).AsQueryable().GroupBy(n => n, (k, g) => k, EqualityComparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2, 2, 0 }.AsQueryable().GroupBy(n => n, (k, g) => k, EqualityComparer<int>.Default).Count();
Assert.Equal(3, count);
}
}
public void OuterEmptyInnerNonEmpty()
{
CustomerRec[] outer = { };
- OrderRec[] inner = new []
- {
+ OrderRec[] inner = {
new OrderRec{ orderID = 45321, custID = 98022, total = 50 },
new OrderRec{ orderID = 97865, custID = 32103, total = 25 }
};
[Fact]
public void CustomComparer()
{
- CustomerRec[] outer = new []
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Tim", custID = 1234 },
new CustomerRec{ name = "Bob", custID = 9865 },
new CustomerRec{ name = "Robert", custID = 9895 }
};
- AnagramRec[] inner = new []
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "Robert", orderID = 93483, total = 19 },
new AnagramRec{ name = "miT", orderID = 93489, total = 45 }
};
- JoinRec[] expected = new []
- {
+ JoinRec[] expected = {
new JoinRec{ name = "Tim", orderID = new int?[]{ 93489 }, total = new int?[]{ 45 } },
new JoinRec{ name = "Bob", orderID = new int?[]{ }, total = new int?[]{ } },
new JoinRec{ name = "Robert", orderID = new int?[]{ 93483 }, total = new int?[]{ 19 } }
public void OuterNull()
{
IQueryable<CustomerRec> outer = null;
- AnagramRec[] inner = new AnagramRec[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "Robert", orderID = 93483, total = 19 },
new AnagramRec{ name = "miT", orderID = 93489, total = 45 }
};
[Fact]
public void InnerNull()
{
- CustomerRec[] outer = new []
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Tim", custID = 1234 },
new CustomerRec{ name = "Bob", custID = 9865 },
new CustomerRec{ name = "Robert", custID = 9895 }
[Fact]
public void OuterKeySelectorNull()
{
- CustomerRec[] outer = new CustomerRec[]
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Tim", custID = 1234 },
new CustomerRec{ name = "Bob", custID = 9865 },
new CustomerRec{ name = "Robert", custID = 9895 }
};
- AnagramRec[] inner = new AnagramRec[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "Robert", orderID = 93483, total = 19 },
new AnagramRec{ name = "miT", orderID = 93489, total = 45 }
};
[Fact]
public void InnerKeySelectorNull()
{
- CustomerRec[] outer = new CustomerRec[]
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Tim", custID = 1234 },
new CustomerRec{ name = "Bob", custID = 9865 },
new CustomerRec{ name = "Robert", custID = 9895 }
};
- AnagramRec[] inner = new AnagramRec[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "Robert", orderID = 93483, total = 19 },
new AnagramRec{ name = "miT", orderID = 93489, total = 45 }
};
[Fact]
public void ResultSelectorNull()
{
- CustomerRec[] outer = new CustomerRec[]
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Tim", custID = 1234 },
new CustomerRec{ name = "Bob", custID = 9865 },
new CustomerRec{ name = "Robert", custID = 9895 }
};
- AnagramRec[] inner = new AnagramRec[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "Robert", orderID = 93483, total = 19 },
new AnagramRec{ name = "miT", orderID = 93489, total = 45 }
};
public void OuterNullNoComparer()
{
IQueryable<CustomerRec> outer = null;
- AnagramRec[] inner = new AnagramRec[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "Robert", orderID = 93483, total = 19 },
new AnagramRec{ name = "miT", orderID = 93489, total = 45 }
};
[Fact]
public void InnerNullNoComparer()
{
- CustomerRec[] outer = new[]
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Tim", custID = 1234 },
new CustomerRec{ name = "Bob", custID = 9865 },
new CustomerRec{ name = "Robert", custID = 9895 }
[Fact]
public void OuterKeySelectorNullNoComparer()
{
- CustomerRec[] outer = new CustomerRec[]
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Tim", custID = 1234 },
new CustomerRec{ name = "Bob", custID = 9865 },
new CustomerRec{ name = "Robert", custID = 9895 }
};
- AnagramRec[] inner = new AnagramRec[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "Robert", orderID = 93483, total = 19 },
new AnagramRec{ name = "miT", orderID = 93489, total = 45 }
};
[Fact]
public void InnerKeySelectorNullNoComparer()
{
- CustomerRec[] outer = new CustomerRec[]
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Tim", custID = 1234 },
new CustomerRec{ name = "Bob", custID = 9865 },
new CustomerRec{ name = "Robert", custID = 9895 }
};
- AnagramRec[] inner = new AnagramRec[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "Robert", orderID = 93483, total = 19 },
new AnagramRec{ name = "miT", orderID = 93489, total = 45 }
};
[Fact]
public void ResultSelectorNullNoComparer()
{
- CustomerRec[] outer = new CustomerRec[]
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Tim", custID = 1234 },
new CustomerRec{ name = "Bob", custID = 9865 },
new CustomerRec{ name = "Robert", custID = 9895 }
};
- AnagramRec[] inner = new AnagramRec[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "Robert", orderID = 93483, total = 19 },
new AnagramRec{ name = "miT", orderID = 93489, total = 45 }
};
[Fact]
public void NullComparer()
{
- CustomerRec[] outer = new []
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Tim", custID = 1234 },
new CustomerRec{ name = "Bob", custID = 9865 },
new CustomerRec{ name = "Robert", custID = 9895 }
};
- AnagramRec[] inner = new []
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "Robert", orderID = 93483, total = 19 },
new AnagramRec{ name = "miT", orderID = 93489, total = 45 }
};
- JoinRec[] expected = new []
- {
+ JoinRec[] expected = {
new JoinRec{ name = "Tim", orderID = new int?[]{ }, total = new int?[]{ } },
new JoinRec{ name = "Bob", orderID = new int?[]{ }, total = new int?[]{ } },
new JoinRec{ name = "Robert", orderID = new int?[]{ 93483 }, total = new int?[]{ 19 } }
[Fact]
public void GroupJoin1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().GroupJoin(new int[] { 1, 2, 3 }, n1 => n1, n2 => n2, (n1, n2) => n1).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().GroupJoin(new[] { 1, 2, 3 }, n1 => n1, n2 => n2, (n1, n2) => n1).Count();
Assert.Equal(3, count);
}
[Fact]
public void GroupJoin2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().GroupJoin(new int[] { 1, 2, 3 }, n1 => n1, n2 => n2, (n1, n2) => n1, EqualityComparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().GroupJoin(new[] { 1, 2, 3 }, n1 => n1, n2 => n2, (n1, n2) => n1, EqualityComparer<int>.Default).Count();
Assert.Equal(3, count);
}
}
[Fact]
public void Intersect1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Intersect((new int[] { 1, 2, 3 }).AsQueryable()).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Intersect(new[] { 1, 2, 3 }.AsQueryable()).Count();
Assert.Equal(2, count);
}
[Fact]
public void Intersect2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Intersect((new int[] { 1, 2, 3 }).AsQueryable(), EqualityComparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Intersect(new[] { 1, 2, 3 }.AsQueryable(), EqualityComparer<int>.Default).Count();
Assert.Equal(2, count);
}
[Fact]
public void FirstOuterMatchesLastInnerLastOuterMatchesFirstInnerSameNumberElements()
{
- CustomerRec[] outer = new []
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Prakash", custID = 98022 },
new CustomerRec{ name = "Tim", custID = 99021 },
new CustomerRec{ name = "Robert", custID = 99022 }
};
- OrderRec[] inner = new []
- {
+ OrderRec[] inner = {
new OrderRec{ orderID = 45321, custID = 99022, total = 50 },
new OrderRec{ orderID = 43421, custID = 29022, total = 20 },
new OrderRec{ orderID = 95421, custID = 98022, total = 9 }
};
- JoinRec[] expected = new []
- {
+ JoinRec[] expected = {
new JoinRec{ name = "Prakash", orderID = 95421, total = 9 },
new JoinRec{ name = "Robert", orderID = 45321, total = 50 }
};
[Fact]
public void NullComparer()
{
- CustomerRec[] outer = new []
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Prakash", custID = 98022 },
new CustomerRec{ name = "Tim", custID = 99021 },
new CustomerRec{ name = "Robert", custID = 99022 }
};
- AnagramRec[] inner = new []
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "miT", orderID = 43455, total = 10 },
new AnagramRec{ name = "Prakash", orderID = 323232, total = 9 }
};
- JoinRec[] expected = new [] { new JoinRec{ name = "Prakash", orderID = 323232, total = 9 } };
+ JoinRec[] expected = { new JoinRec{ name = "Prakash", orderID = 323232, total = 9 } };
Assert.Equal(expected, outer.AsQueryable().Join(inner.AsQueryable(), e => e.name, e => e.name, (cr, or) => new JoinRec { name = cr.name, orderID = or.orderID, total = or.total }, null));
}
[Fact]
public void CustomComparer()
{
- CustomerRec[] outer = new []
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Prakash", custID = 98022 },
new CustomerRec{ name = "Tim", custID = 99021 },
new CustomerRec{ name = "Robert", custID = 99022 }
};
- AnagramRec[] inner = new []
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "miT", orderID = 43455, total = 10 },
new AnagramRec{ name = "Prakash", orderID = 323232, total = 9 }
};
- JoinRec[] expected = new []
- {
+ JoinRec[] expected = {
new JoinRec{ name = "Prakash", orderID = 323232, total = 9 },
new JoinRec{ name = "Tim", orderID = 43455, total = 10 }
};
public void OuterNull()
{
IQueryable<CustomerRec> outer = null;
- AnagramRec[] inner = new []
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "miT", orderID = 43455, total = 10 },
new AnagramRec{ name = "Prakash", orderID = 323232, total = 9 }
};
[Fact]
public void InnerNull()
{
- CustomerRec[] outer = new []
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Prakash", custID = 98022 },
new CustomerRec{ name = "Tim", custID = 99021 },
new CustomerRec{ name = "Robert", custID = 99022 }
[Fact]
public void OuterKeySelectorNull()
{
- CustomerRec[] outer = new []
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Prakash", custID = 98022 },
new CustomerRec{ name = "Tim", custID = 99021 },
new CustomerRec{ name = "Robert", custID = 99022 }
};
- AnagramRec[] inner = new []
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "miT", orderID = 43455, total = 10 },
new AnagramRec{ name = "Prakash", orderID = 323232, total = 9 }
};
[Fact]
public void InnerKeySelectorNull()
{
- CustomerRec[] outer = new []
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Prakash", custID = 98022 },
new CustomerRec{ name = "Tim", custID = 99021 },
new CustomerRec{ name = "Robert", custID = 99022 }
};
- AnagramRec[] inner = new []
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "miT", orderID = 43455, total = 10 },
new AnagramRec{ name = "Prakash", orderID = 323232, total = 9 }
};
[Fact]
public void ResultSelectorNull()
{
- CustomerRec[] outer = new []
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Prakash", custID = 98022 },
new CustomerRec{ name = "Tim", custID = 99021 },
new CustomerRec{ name = "Robert", custID = 99022 }
};
- AnagramRec[] inner = new []
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "miT", orderID = 43455, total = 10 },
new AnagramRec{ name = "Prakash", orderID = 323232, total = 9 }
};
public void OuterNullNoComparer()
{
IQueryable<CustomerRec> outer = null;
- AnagramRec[] inner = new[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "miT", orderID = 43455, total = 10 },
new AnagramRec{ name = "Prakash", orderID = 323232, total = 9 }
};
[Fact]
public void InnerNullNoComparer()
{
- CustomerRec[] outer = new[]
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Prakash", custID = 98022 },
new CustomerRec{ name = "Tim", custID = 99021 },
new CustomerRec{ name = "Robert", custID = 99022 }
[Fact]
public void OuterKeySelectorNullNoComparer()
{
- CustomerRec[] outer = new[]
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Prakash", custID = 98022 },
new CustomerRec{ name = "Tim", custID = 99021 },
new CustomerRec{ name = "Robert", custID = 99022 }
};
- AnagramRec[] inner = new[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "miT", orderID = 43455, total = 10 },
new AnagramRec{ name = "Prakash", orderID = 323232, total = 9 }
};
[Fact]
public void InnerKeySelectorNullNoComparer()
{
- CustomerRec[] outer = new[]
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Prakash", custID = 98022 },
new CustomerRec{ name = "Tim", custID = 99021 },
new CustomerRec{ name = "Robert", custID = 99022 }
};
- AnagramRec[] inner = new[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "miT", orderID = 43455, total = 10 },
new AnagramRec{ name = "Prakash", orderID = 323232, total = 9 }
};
[Fact]
public void ResultSelectorNullNoComparer()
{
- CustomerRec[] outer = new[]
- {
+ CustomerRec[] outer = {
new CustomerRec{ name = "Prakash", custID = 98022 },
new CustomerRec{ name = "Tim", custID = 99021 },
new CustomerRec{ name = "Robert", custID = 99022 }
};
- AnagramRec[] inner = new[]
- {
+ AnagramRec[] inner = {
new AnagramRec{ name = "miT", orderID = 43455, total = 10 },
new AnagramRec{ name = "Prakash", orderID = 323232, total = 9 }
};
[Fact]
public void Join1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Join(new int[] { 1, 2, 3 }, n1 => n1, n2 => n2, (n1, n2) => n1 + n2).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Join(new[] { 1, 2, 3 }, n1 => n1, n2 => n2, (n1, n2) => n1 + n2).Count();
Assert.Equal(2, count);
}
[Fact]
public void Join2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Join(new int[] { 1, 2, 3 }, n1 => n1, n2 => n2, (n1, n2) => n1 + n2, EqualityComparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Join(new[] { 1, 2, 3 }, n1 => n1, n2 => n2, (n1, n2) => n1 + n2, EqualityComparer<int>.Default).Count();
Assert.Equal(2, count);
}
}
[Fact]
public void LastOrDefault1()
{
- var val = (new int[] { 0, 1, 2 }).AsQueryable().LastOrDefault();
+ var val = new[] { 0, 1, 2 }.AsQueryable().LastOrDefault();
Assert.Equal(2, val);
}
[Fact]
public void LastOrDefault2()
{
- var val = (new int[] { 0, 1, 2 }).AsQueryable().LastOrDefault(n => n > 1);
+ var val = new[] { 0, 1, 2 }.AsQueryable().LastOrDefault(n => n > 1);
Assert.Equal(2, val);
}
[Fact]
public void Last1()
{
- var val = (new int[] { 0, 1, 2 }).AsQueryable().Last();
+ var val = new[] { 0, 1, 2 }.AsQueryable().Last();
Assert.Equal(2, val);
}
[Fact]
public void Last2()
{
- var val = (new int[] { 0, 1, 2 }).AsQueryable().Last(n => n > 1);
+ var val = new[] { 0, 1, 2 }.AsQueryable().Last(n => n > 1);
Assert.Equal(2, val);
}
}
[Fact]
public void LongCount1()
{
- var count = (new int[] { 0 }).AsQueryable().LongCount();
+ var count = new[] { 0 }.AsQueryable().LongCount();
Assert.Equal(1L, count);
}
[Fact]
public void LongCount2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().LongCount(n => n > 0);
+ var count = new[] { 0, 1, 2 }.AsQueryable().LongCount(n => n > 0);
Assert.Equal(2L, count);
}
}
[Fact]
public void Max1()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Max();
+ var val = new[] { 0, 2, 1 }.AsQueryable().Max();
Assert.Equal(2, val);
}
[Fact]
public void Max2()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Max(n => n);
+ var val = new[] { 0, 2, 1 }.AsQueryable().Max(n => n);
Assert.Equal(2, val);
}
[Fact]
public void Min1()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Min();
+ var val = new[] { 0, 2, 1 }.AsQueryable().Min();
Assert.Equal(0, val);
}
[Fact]
public void Min2()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Min(n => n);
+ var val = new[] { 0, 2, 1 }.AsQueryable().Min(n => n);
Assert.Equal(0, val);
}
[Fact]
public void OfType()
{
- var count = (new object[] { 0, (long)1, 2 }).AsQueryable().OfType<int>().Count();
+ var count = new object[] { 0, (long)1, 2 }.AsQueryable().OfType<int>().Count();
Assert.Equal(2, count);
}
}
[Fact]
public void OrderByDescending1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().OrderByDescending(n => n).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().OrderByDescending(n => n).Count();
Assert.Equal(3, count);
}
[Fact]
public void OrderByDescending2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().OrderByDescending(n => n, Comparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().OrderByDescending(n => n, Comparer<int>.Default).Count();
Assert.Equal(3, count);
}
}
[Fact]
public void OrderBy1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().OrderBy(n => n).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().OrderBy(n => n).Count();
Assert.Equal(3, count);
}
[Fact]
public void OrderBy2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().OrderBy(n => n, Comparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().OrderBy(n => n, Comparer<int>.Default).Count();
Assert.Equal(3, count);
}
}
[Fact]
public void OrderDescending1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().OrderDescending().Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().OrderDescending().Count();
Assert.Equal(3, count);
}
[Fact]
public void OrderDescending2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().OrderDescending(Comparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().OrderDescending(Comparer<int>.Default).Count();
Assert.Equal(3, count);
}
}
[Fact]
public void Order1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Order().Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Order().Count();
Assert.Equal(3, count);
}
[Fact]
public void Order2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Order(Comparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Order(Comparer<int>.Default).Count();
Assert.Equal(3, count);
}
}
{
Expression access = Expression.Property(null, typeof(QueryFromExpressionTests), "AsciiControlCharacters");
IQueryable<char> q = _prov.CreateQuery<char>(access);
- Assert.Equal(Enumerable.Range(0, 128).Select(i => (char)i).Where(c => char.IsControl(c)), q);
+ Assert.Equal(Enumerable.Range(0, 128).Select(i => (char)i).Where(char.IsControl), q);
}
[Fact]
[Fact]
public void AsQueryable()
{
- Assert.NotNull(((IEnumerable)(new int[] { })).AsQueryable());
+ Assert.NotNull(((IEnumerable)new int[] { }).AsQueryable());
}
[Fact]
public void AsQueryableT()
{
- Assert.NotNull((new int[] { }).AsQueryable());
+ Assert.NotNull(new int[] { }.AsQueryable());
}
[Fact]
[Theory]
[InlineData(new int[] { })]
- [InlineData(new int[] { 1 })]
- [InlineData(new int[] { 5 })]
- [InlineData(new int[] { 1, 3, 5 })]
- [InlineData(new int[] { 2, 4, 6, 8 })]
+ [InlineData(new[] { 1 })]
+ [InlineData(new[] { 5 })]
+ [InlineData(new[] { 1, 3, 5 })]
+ [InlineData(new[] { 2, 4, 6, 8 })]
public void ReverseMatches(int[] input)
{
int[] expectedResults = new int[input.Length];
[Fact]
public void SomeRepeatedElements()
{
- int?[] source = new int?[] { -10, 0, 5, null, 0, 9, 100, null, 9 };
- int?[] expected = new int?[] { 9, null, 100, 9, 0, null, 5, 0, -10 };
+ int?[] source = { -10, 0, 5, null, 0, 9, 100, null, 9 };
+ int?[] expected = { 9, null, 100, 9, 0, null, 5, 0, -10 };
Assert.Equal(expected, source.AsQueryable().Reverse());
}
[Fact]
public void Reverse()
{
- var count = (new int[] { 0, 2, 1 }).AsQueryable().Reverse().Count();
+ var count = new[] { 0, 2, 1 }.AsQueryable().Reverse().Count();
Assert.Equal(3, count);
}
}
[Fact]
public void SelectMany1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().SelectMany(n => new int[] { n + 4, 5 }).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().SelectMany(n => new[] { n + 4, 5 }).Count();
Assert.Equal(6, count);
}
[Fact]
public void SelectMany2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().SelectMany((n, i) => new int[] { 4 + i, 5 + n }).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().SelectMany((n, i) => new[] { 4 + i, 5 + n }).Count();
Assert.Equal(6, count);
}
[Fact]
public void SelectMany3()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().SelectMany(n => new long[] { n + 4, 5 }, (n1, n2) => (n1 + n2).ToString()).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().SelectMany(n => new long[] { n + 4, 5 }, (n1, n2) => (n1 + n2).ToString()).Count();
Assert.Equal(6, count);
}
[Fact]
public void SelectMany4()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().SelectMany((n, i) => new long[] { 4 + i, 5 + n }, (n1, n2) => (n1 + n2).ToString()).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().SelectMany((n, i) => new long[] { 4 + i, 5 + n }, (n1, n2) => (n1 + n2).ToString()).Count();
Assert.Equal(6, count);
}
}
[Fact]
public void Select1()
{
- var count = (new object[] { 0, 1, 2 }).AsQueryable().Select(o => (int)o).Count();
+ var count = new object[] { 0, 1, 2 }.AsQueryable().Select(o => (int)o).Count();
Assert.Equal(3, count);
}
[Fact]
public void Select2()
{
- var count = (new object[] { 0, 1, 2 }).AsQueryable().Select((o, i) => (int)o + i).Count();
+ var count = new object[] { 0, 1, 2 }.AsQueryable().Select((o, i) => (int)o + i).Count();
Assert.Equal(3, count);
}
}
[Fact]
public void SequenceEqual1()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().SequenceEqual(new int[] { 0, 2, 1 });
+ var val = new[] { 0, 2, 1 }.AsQueryable().SequenceEqual(new[] { 0, 2, 1 });
Assert.True(val);
}
[Fact]
public void SequenceEqual2()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().SequenceEqual(new int[] { 0, 2, 1 }, EqualityComparer<int>.Default);
+ var val = new[] { 0, 2, 1 }.AsQueryable().SequenceEqual(new[] { 0, 2, 1 }, EqualityComparer<int>.Default);
Assert.True(val);
}
}
[Fact]
public void SingleOrDefault1()
{
- var val = (new int[] { 2 }).AsQueryable().SingleOrDefault();
+ var val = new[] { 2 }.AsQueryable().SingleOrDefault();
Assert.Equal(2, val);
}
[Fact]
public void SingleOrDefault2()
{
- var val = (new int[] { 2 }).AsQueryable().SingleOrDefault(n => n > 1);
+ var val = new[] { 2 }.AsQueryable().SingleOrDefault(n => n > 1);
Assert.Equal(2, val);
}
[Fact]
public void Single1()
{
- var val = (new int[] { 2 }).AsQueryable().Single();
+ var val = new[] { 2 }.AsQueryable().Single();
Assert.Equal(2, val);
}
[Fact]
public void Single2()
{
- var val = (new int[] { 2 }).AsQueryable().Single(n => n > 1);
+ var val = new[] { 2 }.AsQueryable().Single(n => n > 1);
Assert.Equal(2, val);
}
}
[Fact]
public void Skip()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Skip(1).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Skip(1).Count();
Assert.Equal(2, count);
}
}
[Fact]
public void SkipWhile1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().SkipWhile(n => n < 1).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().SkipWhile(n => n < 1).Count();
Assert.Equal(2, count);
}
[Fact]
public void SkipWhile2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().SkipWhile((n, i) => n + i < 1).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().SkipWhile((n, i) => n + i < 1).Count();
Assert.Equal(2, count);
}
}
[Fact]
public void Sum1()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Sum();
+ var val = new[] { 0, 2, 1 }.AsQueryable().Sum();
Assert.Equal((int)3, val);
}
[Fact]
public void Sum2()
{
- var val = (new int?[] { 0, 2, 1 }).AsQueryable().Sum();
+ var val = new int?[] { 0, 2, 1 }.AsQueryable().Sum();
Assert.Equal((int)3, val);
}
[Fact]
public void Sum3()
{
- var val = (new long[] { 0, 2, 1 }).AsQueryable().Sum();
+ var val = new long[] { 0, 2, 1 }.AsQueryable().Sum();
Assert.Equal((long)3, val);
}
[Fact]
public void Sum4()
{
- var val = (new long?[] { 0, 2, 1 }).AsQueryable().Sum();
+ var val = new long?[] { 0, 2, 1 }.AsQueryable().Sum();
Assert.Equal((long)3, val);
}
[Fact]
public void Sum5()
{
- var val = (new float[] { 0, 2, 1 }).AsQueryable().Sum();
+ var val = new float[] { 0, 2, 1 }.AsQueryable().Sum();
Assert.Equal((float)3, val);
}
[Fact]
public void Sum6()
{
- var val = (new float?[] { 0, 2, 1 }).AsQueryable().Sum();
+ var val = new float?[] { 0, 2, 1 }.AsQueryable().Sum();
Assert.Equal((float)3, val);
}
[Fact]
public void Sum7()
{
- var val = (new double[] { 0, 2, 1 }).AsQueryable().Sum();
+ var val = new double[] { 0, 2, 1 }.AsQueryable().Sum();
Assert.Equal((double)3, val);
}
[Fact]
public void Sum8()
{
- var val = (new double?[] { 0, 2, 1 }).AsQueryable().Sum();
+ var val = new double?[] { 0, 2, 1 }.AsQueryable().Sum();
Assert.Equal((double)3, val);
}
[Fact]
public void Sum9()
{
- var val = (new decimal[] { 0, 2, 1 }).AsQueryable().Sum();
+ var val = new decimal[] { 0, 2, 1 }.AsQueryable().Sum();
Assert.Equal((decimal)3, val);
}
[Fact]
public void Sum10()
{
- var val = (new decimal?[] { 0, 2, 1 }).AsQueryable().Sum();
+ var val = new decimal?[] { 0, 2, 1 }.AsQueryable().Sum();
Assert.Equal((decimal)3, val);
}
[Fact]
public void Sum11()
{
- var val = (new int[] { 0, 2, 1 }).AsQueryable().Sum(n => n);
+ var val = new[] { 0, 2, 1 }.AsQueryable().Sum(n => n);
Assert.Equal((int)3, val);
}
[Fact]
public void Sum12()
{
- var val = (new int?[] { 0, 2, 1 }).AsQueryable().Sum(n => n);
+ var val = new int?[] { 0, 2, 1 }.AsQueryable().Sum(n => n);
Assert.Equal((int)3, val);
}
[Fact]
public void Sum13()
{
- var val = (new long[] { 0, 2, 1 }).AsQueryable().Sum(n => n);
+ var val = new long[] { 0, 2, 1 }.AsQueryable().Sum(n => n);
Assert.Equal((long)3, val);
}
[Fact]
public void Sum14()
{
- var val = (new long?[] { 0, 2, 1 }).AsQueryable().Sum(n => n);
+ var val = new long?[] { 0, 2, 1 }.AsQueryable().Sum(n => n);
Assert.Equal((long)3, val);
}
[Fact]
public void Sum15()
{
- var val = (new float[] { 0, 2, 1 }).AsQueryable().Sum(n => n);
+ var val = new float[] { 0, 2, 1 }.AsQueryable().Sum(n => n);
Assert.Equal((float)3, val);
}
[Fact]
public void Sum16()
{
- var val = (new float?[] { 0, 2, 1 }).AsQueryable().Sum(n => n);
+ var val = new float?[] { 0, 2, 1 }.AsQueryable().Sum(n => n);
Assert.Equal((float)3, val);
}
[Fact]
public void Sum17()
{
- var val = (new double[] { 0, 2, 1 }).AsQueryable().Sum(n => n);
+ var val = new double[] { 0, 2, 1 }.AsQueryable().Sum(n => n);
Assert.Equal((double)3, val);
}
[Fact]
public void Sum18()
{
- var val = (new double?[] { 0, 2, 1 }).AsQueryable().Sum(n => n);
+ var val = new double?[] { 0, 2, 1 }.AsQueryable().Sum(n => n);
Assert.Equal((double)3, val);
}
[Fact]
public void Sum19()
{
- var val = (new decimal[] { 0, 2, 1 }).AsQueryable().Sum(n => n);
+ var val = new decimal[] { 0, 2, 1 }.AsQueryable().Sum(n => n);
Assert.Equal((decimal)3, val);
}
[Fact]
public void Sum20()
{
- var val = (new decimal?[] { 0, 2, 1 }).AsQueryable().Sum(n => n);
+ var val = new decimal?[] { 0, 2, 1 }.AsQueryable().Sum(n => n);
Assert.Equal((decimal)3, val);
}
}
[Fact]
public void TakeWhile1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().TakeWhile(n => n < 2).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().TakeWhile(n => n < 2).Count();
Assert.Equal(2, count);
}
[Fact]
public void TakeWhile2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().TakeWhile((n, i) => n + i < 4).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().TakeWhile((n, i) => n + i < 4).Count();
Assert.Equal(2, count);
}
}
[Fact]
public void ThenByDescending1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().OrderBy(n => n).ThenByDescending(n => n).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().OrderBy(n => n).ThenByDescending(n => n).Count();
Assert.Equal(3, count);
}
[Fact]
public void ThenByDescending2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().OrderBy(n => n).ThenByDescending(n => n, Comparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().OrderBy(n => n).ThenByDescending(n => n, Comparer<int>.Default).Count();
Assert.Equal(3, count);
}
}
[Fact]
public void ThenBy1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().OrderBy(n => n).ThenBy(n => n).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().OrderBy(n => n).ThenBy(n => n).Count();
Assert.Equal(3, count);
}
[Fact]
public void ThenBy2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().OrderBy(n => n).ThenBy(n => n, Comparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().OrderBy(n => n).ThenBy(n => n, Comparer<int>.Default).Count();
Assert.Equal(3, count);
}
}
}
/// <summary>
- /// Verifies that all methods in CachedReflectionInfo that call MakeGenericMethod
- /// call it on a method that doesn't contain any trimming annotations (i.e. DynamicallyAccessedMembers).
- /// </summary>
- /// <remarks>
- /// This ensures it is safe to suppress IL2060:MakeGenericMethod warnings in the CachedReflectionInfo class.
- /// </remarks>
- [Fact]
- public static void CachedReflectionInfoMethodsNoAnnotations()
- {
- IEnumerable<MethodInfo> methods =
- typeof(Queryable).Assembly
- .GetType("System.Linq.CachedReflectionInfo")
- .GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static)
- .Where(m => m.GetParameters().Length > 0);
-
- // If you are adding a new method to this class, ensure the method meets these requirements
- Assert.Equal(135, methods.Count());
- foreach (MethodInfo method in methods)
- {
- ParameterInfo[] parameters = method.GetParameters();
-
- Type[] args = new Type[parameters.Length];
- for (int i = 0; i < args.Length; i++)
- {
- args[i] = typeof(object);
- }
-
- MethodInfo resultMethodInfo = (MethodInfo)method.Invoke(null, args);
- Assert.True(resultMethodInfo.IsConstructedGenericMethod);
- MethodInfo originalGenericDefinition = resultMethodInfo.GetGenericMethodDefinition();
-
- EnsureNoTrimAnnotations(originalGenericDefinition);
- }
- }
-
- /// <summary>
/// Verifies that all methods in Enumerable don't contain any trimming annotations (i.e. DynamicallyAccessedMembers).
/// </summary>
/// <remarks>
[Fact]
public void Union1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Union((new int[] { 1, 2, 3 }).AsQueryable()).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Union(new[] { 1, 2, 3 }.AsQueryable()).Count();
Assert.Equal(4, count);
}
[Fact]
public void Union2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Union((new int[] { 1, 2, 3 }).AsQueryable(), EqualityComparer<int>.Default).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Union(new[] { 1, 2, 3 }.AsQueryable(), EqualityComparer<int>.Default).Count();
Assert.Equal(4, count);
}
[Fact]
public void ReturnsExpectedValues_True()
{
- int[] source = new[] { 1, 2, 3, 4, 5 };
+ int[] source = { 1, 2, 3, 4, 5 };
Assert.Equal(source, source.AsQueryable().Where(i => true));
}
[Fact]
public void ReturnsExpectedValues_False()
{
- int[] source = new[] { 1, 2, 3, 4, 5 };
+ int[] source = { 1, 2, 3, 4, 5 };
Assert.Empty(source.AsQueryable().Where(i => false));
}
[Fact]
public void ReturnsExpectedValuesIndexed_True()
{
- int[] source = new[] { 1, 2, 3, 4, 5 };
+ int[] source = { 1, 2, 3, 4, 5 };
Assert.Equal(source, source.AsQueryable().Where((e, i) => true));
}
[Fact]
public void ReturnsExpectedValuesIndexed_False()
{
- int[] source = new[] { 1, 2, 3, 4, 5 };
+ int[] source = { 1, 2, 3, 4, 5 };
Assert.Empty(source.AsQueryable().Where((e, i) => false));
}
[Fact]
public void Where1()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Where(n => n > 1).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Where(n => n > 1).Count();
Assert.Equal(1, count);
}
[Fact]
public void Where2()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Where((n, i) => n > 1 || i == 0).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Where((n, i) => n > 1 || i == 0).Count();
Assert.Equal(2, count);
}
}
[Fact]
public void CorrectResults()
{
- int[] first = new int[] { 1, 2, 3 };
- int[] second = new int[] { 2, 5, 9 };
- int[] expected = new int[] { 3, 7, 12 };
+ int[] first = { 1, 2, 3 };
+ int[] second = { 2, 5, 9 };
+ int[] expected = { 3, 7, 12 };
Assert.Equal(expected, first.AsQueryable().Zip(second.AsQueryable(), (x, y) => x + y));
}
public void FirstIsNull()
{
IQueryable<int> first = null;
- int[] second = new int[] { 2, 5, 9 };
+ int[] second = { 2, 5, 9 };
AssertExtensions.Throws<ArgumentNullException>("source1", () => first.Zip(second.AsQueryable(), (x, y) => x + y));
}
[Fact]
public void SecondIsNull()
{
- int[] first = new int[] { 1, 2, 3 };
+ int[] first = { 1, 2, 3 };
IQueryable<int> second = null;
AssertExtensions.Throws<ArgumentNullException>("source2", () => first.AsQueryable().Zip(second, (x, y) => x + y));
}
[Fact]
public void FuncIsNull()
{
- IQueryable<int> first = new int[] { 1, 2, 3 }.AsQueryable();
- IQueryable<int> second = new int[] { 2, 4, 6 }.AsQueryable();
+ IQueryable<int> first = new[] { 1, 2, 3 }.AsQueryable();
+ IQueryable<int> second = new[] { 2, 4, 6 }.AsQueryable();
Expression<Func<int, int, int>> func = null;
AssertExtensions.Throws<ArgumentNullException>("resultSelector", () => first.Zip(second, func));
}
[Fact]
public void Zip()
{
- var count = (new int[] { 0, 1, 2 }).AsQueryable().Zip((new int[] { 10, 11, 12 }).AsQueryable(), (n1, n2) => n1 + n2).Count();
+ var count = new[] { 0, 1, 2 }.AsQueryable().Zip(new[] { 10, 11, 12 }.AsQueryable(), (n1, n2) => n1 + n2).Count();
Assert.Equal(3, count);
}
[Fact]
public void Zip2_CorrectResults()
{
- int[] first = new int[] { 1, 2, 3 };
- int[] second = new int[] { 2, 5, 9 };
- var expected = new (int, int)[] { (1, 2), (2, 5), (3, 9) };
+ int[] first = { 1, 2, 3 };
+ int[] second = { 2, 5, 9 };
+ var expected = new[] { (1, 2), (2, 5), (3, 9) };
Assert.Equal(expected, first.AsQueryable().Zip(second.AsQueryable()));
}
public void Zip2_FirstIsNull()
{
IQueryable<int> first = null;
- int[] second = new int[] { 2, 5, 9 };
+ int[] second = { 2, 5, 9 };
AssertExtensions.Throws<ArgumentNullException>("source1", () => first.Zip(second.AsQueryable()));
}
[Fact]
public void Zip2_SecondIsNull()
{
- int[] first = new int[] { 1, 2, 3 };
+ int[] first = { 1, 2, 3 };
IQueryable<int> second = null;
AssertExtensions.Throws<ArgumentNullException>("source2", () => first.AsQueryable().Zip(second));
}
[Fact]
public void Zip2()
{
- int count = (new int[] { 0, 1, 2 }).AsQueryable().Zip((new int[] { 10, 11, 12 }).AsQueryable()).Count();
+ int count = new[] { 0, 1, 2 }.AsQueryable().Zip(new[] { 10, 11, 12 }.AsQueryable()).Count();
Assert.Equal(3, count);
}
[Fact]
public void TupleNames()
{
- int[] first = new int[] { 1 };
- int[] second = new int[] { 2 };
+ int[] first = { 1 };
+ int[] second = { 2 };
var tuple = first.AsQueryable().Zip(second.AsQueryable()).First();
Assert.Equal(tuple.Item1, tuple.First);
Assert.Equal(tuple.Item2, tuple.Second);
[Fact]
public void Zip3_CorrectResults()
{
- int[] first = new int[] { 1, 3, 5 };
- int[] second = new int[] { 2, 6, 8 };
- int[] third = new int[] { 1, 7, 2 };
- var expected = new (int, int, int)[] { (1, 2, 1), (3, 6, 7), (5, 8, 2) };
+ int[] first = { 1, 3, 5 };
+ int[] second = { 2, 6, 8 };
+ int[] third = { 1, 7, 2 };
+ var expected = new[] { (1, 2, 1), (3, 6, 7), (5, 8, 2) };
Assert.Equal(expected, first.AsQueryable().Zip(second.AsQueryable(), third.AsQueryable()));
}
public void Zip3_FirstIsNull()
{
IQueryable<int> first = null;
- int[] second = new int[] { 2, 6, 8 };
- int[] third = new int[] { 1, 7, 2 };
+ int[] second = { 2, 6, 8 };
+ int[] third = { 1, 7, 2 };
AssertExtensions.Throws<ArgumentNullException>("source1", () => first.Zip(second.AsQueryable(), third.AsQueryable()));
}
[Fact]
public void Zip3_SecondIsNull()
{
- int[] first = new int[] { 1, 3, 5 };
+ int[] first = { 1, 3, 5 };
IQueryable<int> second = null;
- int[] third = new int[] { 1, 7, 2 };
+ int[] third = { 1, 7, 2 };
AssertExtensions.Throws<ArgumentNullException>("source2", () => first.AsQueryable().Zip(second, third.AsQueryable()));
}
[Fact]
public void Zip3_ThirdIsNull()
{
- int[] first = new int[] { 1, 3, 5 };
- int[] second = new int[] { 2, 6, 8 };
+ int[] first = { 1, 3, 5 };
+ int[] second = { 2, 6, 8 };
IQueryable<int> third = null;
AssertExtensions.Throws<ArgumentNullException>("source3", () => first.AsQueryable().Zip(second.AsQueryable(), third));
}
[Fact]
public void Zip3_TupleNames()
{
- int[] first = new int[] { 1 };
- int[] second = new int[] { 2 };
- int[] third = new int[] { 3 };
+ int[] first = { 1 };
+ int[] second = { 2 };
+ int[] third = { 3 };
var tuple = first.AsQueryable().Zip(second.AsQueryable(), third.AsQueryable()).First();
Assert.Equal(tuple.Item1, tuple.First);
Assert.Equal(tuple.Item2, tuple.Second);