From a2410b2267abe193191f3894d243771ae4b126fd Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Mon, 6 Dec 2021 11:58:35 -0500 Subject: [PATCH 1/4] Remove support for .NET Core 2.1 and netstandard1.0. bump .net to 4.8 --- .../Benchmarks.System.Interactive.csproj | 2 +- .../System.Interactive.Async.Providers.Tests.csproj | 2 +- .../System.Interactive.Async.Providers.csproj | 2 +- .../System.Interactive.Async.Tests.csproj | 2 +- .../System.Interactive.Async.csproj | 2 +- .../System.Interactive.Providers.csproj | 10 +--------- .../System.Interactive.Tests.csproj | 2 +- .../System.Interactive/System.Interactive.csproj | 2 +- .../System.Linq.Async.Queryable.Tests.csproj | 2 +- .../System.Linq.Async.Queryable.csproj | 2 +- .../System.Linq.Async.SourceGenerator.csproj | 1 + .../System.Linq.Async.Tests.csproj | 2 +- .../Source/System.Linq.Async/System.Linq.Async.csproj | 2 +- .../System.Interactive.Providers.Ref.csproj | 11 +---------- .../System.Interactive.Ref.csproj | 2 +- .../System.Linq.Async.Ref.csproj | 5 +++-- Ix.NET/Source/version.json | 2 +- 17 files changed, 19 insertions(+), 34 deletions(-) diff --git a/Ix.NET/Source/Benchmarks.System.Interactive/Benchmarks.System.Interactive.csproj b/Ix.NET/Source/Benchmarks.System.Interactive/Benchmarks.System.Interactive.csproj index 6be82eea60..90a39816c6 100644 --- a/Ix.NET/Source/Benchmarks.System.Interactive/Benchmarks.System.Interactive.csproj +++ b/Ix.NET/Source/Benchmarks.System.Interactive/Benchmarks.System.Interactive.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.1 + net6.0 true Current Sources;Ix.net 3.1.1;Ix.net 3.2 diff --git a/Ix.NET/Source/System.Interactive.Async.Providers.Tests/System.Interactive.Async.Providers.Tests.csproj b/Ix.NET/Source/System.Interactive.Async.Providers.Tests/System.Interactive.Async.Providers.Tests.csproj index ee9410ed15..63d772cb85 100644 --- a/Ix.NET/Source/System.Interactive.Async.Providers.Tests/System.Interactive.Async.Providers.Tests.csproj +++ b/Ix.NET/Source/System.Interactive.Async.Providers.Tests/System.Interactive.Async.Providers.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;net461;netcoreapp3.1;net6.0 + net48;net6.0;netcoreapp3.1 $(NoWarn);CS0618 diff --git a/Ix.NET/Source/System.Interactive.Async.Providers/System.Interactive.Async.Providers.csproj b/Ix.NET/Source/System.Interactive.Async.Providers/System.Interactive.Async.Providers.csproj index 3a3c39086f..73c0db2620 100644 --- a/Ix.NET/Source/System.Interactive.Async.Providers/System.Interactive.Async.Providers.csproj +++ b/Ix.NET/Source/System.Interactive.Async.Providers/System.Interactive.Async.Providers.csproj @@ -3,7 +3,7 @@ Interactive Extensions Async Providers Library used to build query providers and express queries over async enumerable sequences. Interactive Extensions - Async Providers Library - net461;netstandard2.0;netstandard2.1;netcoreapp3.1 + net48;netstandard2.0;netstandard2.1;net6.0 Ix;Interactive;Extensions;Enumerable;Asynchronous diff --git a/Ix.NET/Source/System.Interactive.Async.Tests/System.Interactive.Async.Tests.csproj b/Ix.NET/Source/System.Interactive.Async.Tests/System.Interactive.Async.Tests.csproj index 582d18fda5..0bcab474c9 100644 --- a/Ix.NET/Source/System.Interactive.Async.Tests/System.Interactive.Async.Tests.csproj +++ b/Ix.NET/Source/System.Interactive.Async.Tests/System.Interactive.Async.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;net461;netcoreapp3.1;net6.0 + net48;net6.0;netcoreapp3.1 $(NoWarn);CS0618;CS8603;CS8625 diff --git a/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj b/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj index 1bc6aa8a9b..06bddca8c8 100644 --- a/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj +++ b/Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj @@ -3,7 +3,7 @@ Interactive Extensions Async Library used to express queries over asynchronous enumerable sequences. Interactive Extensions - Async Library - net461;netstandard2.0;netstandard2.1;netcoreapp3.1 + net48;netstandard2.0;netstandard2.1;net6.0 Ix;Interactive;Extensions;Enumerable;Asynchronous diff --git a/Ix.NET/Source/System.Interactive.Providers/System.Interactive.Providers.csproj b/Ix.NET/Source/System.Interactive.Providers/System.Interactive.Providers.csproj index 316251813b..93b9840fdc 100644 --- a/Ix.NET/Source/System.Interactive.Providers/System.Interactive.Providers.csproj +++ b/Ix.NET/Source/System.Interactive.Providers/System.Interactive.Providers.csproj @@ -3,14 +3,10 @@ Interactive Extensions Providers Library used to build query providers and express queries over enumerable sequences. Interactive Extensions - Providers Library - net45;netstandard1.0;netstandard2.0 + net48;netstandard2.0;net6.0 Ix;Interactive;Extensions;Enumerable - - $(DefineConstants);CRIPPLED_REFLECTION - - @@ -20,8 +16,4 @@ - - - - diff --git a/Ix.NET/Source/System.Interactive.Tests/System.Interactive.Tests.csproj b/Ix.NET/Source/System.Interactive.Tests/System.Interactive.Tests.csproj index 0c6a1ce9ab..e83b53e4ba 100644 --- a/Ix.NET/Source/System.Interactive.Tests/System.Interactive.Tests.csproj +++ b/Ix.NET/Source/System.Interactive.Tests/System.Interactive.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;net461;net6.0 + net48;net6.0;netcoreapp3.1 $(NoWarn);CS0618;CS8603;CS8625 diff --git a/Ix.NET/Source/System.Interactive/System.Interactive.csproj b/Ix.NET/Source/System.Interactive/System.Interactive.csproj index b3fc11fb08..8badecf58b 100644 --- a/Ix.NET/Source/System.Interactive/System.Interactive.csproj +++ b/Ix.NET/Source/System.Interactive/System.Interactive.csproj @@ -4,7 +4,7 @@ Interactive Extensions Main Library used to express queries over enumerable sequences. Interactive Extensions - Main Library Microsoft - net45;netstandard1.0;netstandard2.0 + net48;netstandard2.0;net6.0 Ix;Interactive;Extensions;Enumerable diff --git a/Ix.NET/Source/System.Linq.Async.Queryable.Tests/System.Linq.Async.Queryable.Tests.csproj b/Ix.NET/Source/System.Linq.Async.Queryable.Tests/System.Linq.Async.Queryable.Tests.csproj index cdf1605e22..25381dc38a 100644 --- a/Ix.NET/Source/System.Linq.Async.Queryable.Tests/System.Linq.Async.Queryable.Tests.csproj +++ b/Ix.NET/Source/System.Linq.Async.Queryable.Tests/System.Linq.Async.Queryable.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;net461;netcoreapp3.1;net6.0 + net48;net6.0;netcoreapp3.1 $(NoWarn);CS0618 diff --git a/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj b/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj index ef3748fb7d..49a175d557 100644 --- a/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj +++ b/Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj @@ -1,7 +1,7 @@  - net461;netstandard2.0;netstandard2.1;netcoreapp3.1 + net48;netstandard2.0;netstandard2.1;net6.0 System.Linq.Async.Queryable LINQ;async;streams;query;provider Provides support for Language-Integrated Query (LINQ) over IAsyncQueryable<T> sequences with query providers. diff --git a/Ix.NET/Source/System.Linq.Async.SourceGenerator/System.Linq.Async.SourceGenerator.csproj b/Ix.NET/Source/System.Linq.Async.SourceGenerator/System.Linq.Async.SourceGenerator.csproj index 049ce04f5c..9c0dd87697 100644 --- a/Ix.NET/Source/System.Linq.Async.SourceGenerator/System.Linq.Async.SourceGenerator.csproj +++ b/Ix.NET/Source/System.Linq.Async.SourceGenerator/System.Linq.Async.SourceGenerator.csproj @@ -2,6 +2,7 @@ netstandard2.0 9.0 + false diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj b/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj index a108f44f7a..68f67daebc 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj +++ b/Ix.NET/Source/System.Linq.Async.Tests/System.Linq.Async.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;net461;netcoreapp3.1;net6.0 + net48;net6.0;netcoreapp3.1 $(NoWarn);CS0618;CS8603;CS8625 diff --git a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj index 18115c8a5f..4037e057be 100644 --- a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj +++ b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj @@ -1,7 +1,7 @@  - net461;netstandard2.0;netstandard2.1;netcoreapp3.1 + net48;netstandard2.0;netstandard2.1;net6.0 System.Linq.Async LINQ;async;streams;query Provides support for Language-Integrated Query (LINQ) over IAsyncEnumerable<T> sequences. diff --git a/Ix.NET/Source/refs/System.Interactive.Providers.Ref/System.Interactive.Providers.Ref.csproj b/Ix.NET/Source/refs/System.Interactive.Providers.Ref/System.Interactive.Providers.Ref.csproj index 1c1a6aac5f..716b0a8e36 100644 --- a/Ix.NET/Source/refs/System.Interactive.Providers.Ref/System.Interactive.Providers.Ref.csproj +++ b/Ix.NET/Source/refs/System.Interactive.Providers.Ref/System.Interactive.Providers.Ref.csproj @@ -3,15 +3,11 @@ Interactive Extensions Providers Library used to build query providers and express queries over enumerable sequences. Interactive Extensions - Providers Library - netstandard1.0;netcoreapp2.1;netstandard2.1 + net4.8;netstandard2.1;net6.0 Ix;Interactive;Extensions;Enumerable System.Interactive.Providers - - $(DefineConstants);CRIPPLED_REFLECTION - - @@ -19,10 +15,5 @@ - - - - - diff --git a/Ix.NET/Source/refs/System.Interactive.Ref/System.Interactive.Ref.csproj b/Ix.NET/Source/refs/System.Interactive.Ref/System.Interactive.Ref.csproj index 26655520ba..0f8f24d31d 100644 --- a/Ix.NET/Source/refs/System.Interactive.Ref/System.Interactive.Ref.csproj +++ b/Ix.NET/Source/refs/System.Interactive.Ref/System.Interactive.Ref.csproj @@ -5,7 +5,7 @@ Interactive Extensions - Main Library System.Interactive Microsoft - netstandard1.0;netcoreapp2.1;netstandard2.1;net6.0 + net4.8;netstandard2.1;net6.0 Ix;Interactive;Extensions;Enumerable diff --git a/Ix.NET/Source/refs/System.Linq.Async.Ref/System.Linq.Async.Ref.csproj b/Ix.NET/Source/refs/System.Linq.Async.Ref/System.Linq.Async.Ref.csproj index 06bdb0c5db..231da05917 100644 --- a/Ix.NET/Source/refs/System.Linq.Async.Ref/System.Linq.Async.Ref.csproj +++ b/Ix.NET/Source/refs/System.Linq.Async.Ref/System.Linq.Async.Ref.csproj @@ -4,14 +4,15 @@ LINQ Standard Query Operators used to express queries over asynchronous enumerable sequences. System.Linq.Async Microsoft - net461;netstandard2.0;netstandard2.1;netcoreapp3.1 + net48;netstandard2.0;netstandard2.1;net6.0 Enumerable;Asynchronous;LINQ System.Linq.Async - + diff --git a/Ix.NET/Source/version.json b/Ix.NET/Source/version.json index 9231a30c45..89a6110fad 100644 --- a/Ix.NET/Source/version.json +++ b/Ix.NET/Source/version.json @@ -1,5 +1,5 @@ { - "version": "5.1.0", + "version": "6.0.0-preview.{height}", "publicReleaseRefSpec": [ "^refs/heads/main$", // we release out of main "^refs/heads/rel/v\\d+\\.\\d+", // we also release branches starting with vN.N From 0326d6650345429aa9a272d9f3c14de16d93228a Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Mon, 6 Dec 2021 12:27:43 -0500 Subject: [PATCH 2/4] Remove old ifdefs from old platforms --- .../MinMaxBenchmark.cs | 4 + .../Benchmarks.System.Interactive/Program.cs | 5 +- Ix.NET/Source/Directory.Build.targets | 22 -- .../Reflection.cs | 55 ---- .../System/Linq/QueryableEx.Generated.cs | 277 ++---------------- .../System/Linq/AsyncQueryable.cs | 2 - .../System/Linq/Operators/Zip.cs | 2 - .../System/Linq/Operators/Zip.cs | 2 - 8 files changed, 32 insertions(+), 337 deletions(-) delete mode 100644 Ix.NET/Source/System.Interactive.Providers/Reflection.cs diff --git a/Ix.NET/Source/Benchmarks.System.Interactive/MinMaxBenchmark.cs b/Ix.NET/Source/Benchmarks.System.Interactive/MinMaxBenchmark.cs index 9faee4e571..8e31862573 100644 --- a/Ix.NET/Source/Benchmarks.System.Interactive/MinMaxBenchmark.cs +++ b/Ix.NET/Source/Benchmarks.System.Interactive/MinMaxBenchmark.cs @@ -9,6 +9,9 @@ namespace Benchmarks.System.Interactive { + +#if !NET6_0_OR_GREATER + [MemoryDiagnoser] public class MinMaxBenchmark { @@ -43,4 +46,5 @@ public void MaxBy() Volatile.Write(ref _listStore, Enumerable.Range(1, N).MaxBy(v => -v, _comparer)); } } +#endif } diff --git a/Ix.NET/Source/Benchmarks.System.Interactive/Program.cs b/Ix.NET/Source/Benchmarks.System.Interactive/Program.cs index 2578f92c1c..5f3763dbbd 100644 --- a/Ix.NET/Source/Benchmarks.System.Interactive/Program.cs +++ b/Ix.NET/Source/Benchmarks.System.Interactive/Program.cs @@ -20,8 +20,11 @@ internal static void Main() typeof(BufferCountBenchmark), typeof(IgnoreElementsBenchmark), typeof(DeferBenchmark), - typeof(RetryBenchmark), + typeof(RetryBenchmark) +#if !NET6_0_OR_GREATER + , typeof(MinMaxBenchmark) +#endif }); switcher.Run(); diff --git a/Ix.NET/Source/Directory.Build.targets b/Ix.NET/Source/Directory.Build.targets index d7807ab238..c6325ceca7 100644 --- a/Ix.NET/Source/Directory.Build.targets +++ b/Ix.NET/Source/Directory.Build.targets @@ -1,31 +1,9 @@  - - $(DefineConstants);NO_ARRAY_EMPTY;NO_CODE_COVERAGE_ATTRIBUTE - - - $(DefineConstants);NO_CODE_COVERAGE_ATTRIBUTE - - - $(DefineConstants);NO_ARRAY_EMPTY;NO_TASK_FROMEXCEPTION - - - $(DefineConstants);HAS_VALUETUPLE - $(AssemblyName) ($(TargetFramework)) - - - - <_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/> - - - diff --git a/Ix.NET/Source/System.Interactive.Providers/Reflection.cs b/Ix.NET/Source/System.Interactive.Providers/Reflection.cs deleted file mode 100644 index 9d791b8ad3..0000000000 --- a/Ix.NET/Source/System.Interactive.Providers/Reflection.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT License. -// See the LICENSE file in the project root for more information. -#if CRIPPLED_REFLECTION -using System.Linq; -using System.Reflection; - -namespace System.Reflection -{ - [Flags] - internal enum BindingFlags - { - Instance = 4, - Static = 8, - Public = 16, - NonPublic = 32, - } -} - -namespace System -{ - internal static class TypeExtensions - { - public static bool IsAssignableFrom(this Type t1, Type t2) - { - return t1.GetTypeInfo().IsAssignableFrom(t2.GetTypeInfo()); - } - - public static MethodInfo[] GetMethods(this Type t, BindingFlags flags) - { - return t.GetTypeInfo().DeclaredMethods.Where(m => IsVisible(m, flags)).ToArray(); - } - - private static bool IsVisible(MethodInfo method, BindingFlags flags) - { - if ((flags & BindingFlags.Public) != 0 != method.IsPublic) - { - return false; - } - - if ((flags & BindingFlags.NonPublic) == 0 && !method.IsPublic) - { - return false; - } - - if ((flags & BindingFlags.Static) != 0 != method.IsStatic) - { - return false; - } - - return true; - } - } -} -#endif diff --git a/Ix.NET/Source/System.Interactive.Providers/System/Linq/QueryableEx.Generated.cs b/Ix.NET/Source/System.Interactive.Providers/System/Linq/QueryableEx.Generated.cs index 391e6e665e..5d3a4a0a60 100644 --- a/Ix.NET/Source/System.Interactive.Providers/System/Linq/QueryableEx.Generated.cs +++ b/Ix.NET/Source/System.Interactive.Providers/System/Linq/QueryableEx.Generated.cs @@ -25,11 +25,7 @@ public static bool IsEmpty(this IQueryable source) return source.Provider.Execute( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.IsEmpty(default(IQueryable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression ) ); @@ -60,11 +56,7 @@ public static TSource Min(this IQueryable source, IComparer( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Min(default(IQueryable), default(IComparer))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, Expression.Constant(comparer, typeof(IComparer)) ) @@ -75,7 +67,12 @@ public static TSource Min(this IQueryable source, IComparer(IEnumerable source, IComparer comparer) { +#if NET6_0 + return Enumerable.Min(source, comparer); + +#else return EnumerableEx.Min(source, comparer); +#endif } #pragma warning restore 1591 @@ -97,11 +94,7 @@ public static IList MinBy(this IQueryable sourc return source.Provider.Execute>( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.MinBy(default(IQueryable), default(Expression>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), -#endif source.Expression, keySelector ) @@ -137,11 +130,7 @@ public static IList MinBy(this IQueryable sourc return source.Provider.Execute>( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.MinBy(default(IQueryable), default(Expression>), default(IComparer))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), -#endif source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)) @@ -153,7 +142,14 @@ public static IList MinBy(this IQueryable sourc [EditorBrowsable(EditorBrowsableState.Never)] public static IList MinBy(IEnumerable source, Func keySelector, IComparer comparer) { +#if NET6_0 + return new List() + { + Enumerable.MinBy(source, keySelector, comparer) + }; +#else return EnumerableEx.MinBy(source, keySelector, comparer); +#endif } #pragma warning restore 1591 @@ -174,11 +170,7 @@ public static TSource Max(this IQueryable source, IComparer( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Max(default(IQueryable), default(IComparer))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, Expression.Constant(comparer, typeof(IComparer)) ) @@ -189,7 +181,11 @@ public static TSource Max(this IQueryable source, IComparer(IEnumerable source, IComparer comparer) { +#if NET6_0 + return Enumerable.Max(source, comparer); +#else return EnumerableEx.Max(source, comparer); +#endif } #pragma warning restore 1591 @@ -211,11 +207,7 @@ public static IList MaxBy(this IQueryable sourc return source.Provider.Execute>( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.MaxBy(default(IQueryable), default(Expression>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), -#endif source.Expression, keySelector ) @@ -251,11 +243,7 @@ public static IList MaxBy(this IQueryable sourc return source.Provider.Execute>( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.MaxBy(default(IQueryable), default(Expression>), default(IComparer))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), -#endif source.Expression, keySelector, Expression.Constant(comparer, typeof(IComparer)) @@ -267,7 +255,14 @@ public static IList MaxBy(this IQueryable sourc [EditorBrowsable(EditorBrowsableState.Never)] public static IList MaxBy(IEnumerable source, Func keySelector, IComparer comparer) { +#if NET6_0 + return new List + { + Enumerable.MaxBy(source, keySelector, comparer) + }; +#else return EnumerableEx.MaxBy(source, keySelector, comparer); +#endif } #pragma warning restore 1591 @@ -326,11 +321,7 @@ public static IQueryable Publish(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Publish(default(IQueryable), default(Expression, IEnumerable>>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), -#endif source.Expression, selector ) @@ -363,11 +354,7 @@ public static IQueryable Memoize(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Memoize(default(IQueryable), default(Expression, IEnumerable>>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), -#endif source.Expression, selector ) @@ -401,11 +388,7 @@ public static IQueryable Memoize(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Memoize(default(IQueryable), default(int), default(Expression, IEnumerable>>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), -#endif source.Expression, Expression.Constant(readerCount, typeof(int)), selector @@ -438,11 +421,7 @@ public static IQueryable Create(this IQueryProvider provider, return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Create(default(IQueryProvider), default(Expression>>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), getEnumerator ) @@ -472,11 +451,7 @@ public static IQueryable Return(this IQueryProvider provider, return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Return(default(IQueryProvider), default(TResult))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), Expression.Constant(value, typeof(TResult)) ) @@ -508,11 +483,7 @@ public static IQueryable Throw(this IQueryProvider provider, E return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Throw(default(IQueryProvider), default(Exception))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), Expression.Constant(exception, typeof(Exception)) ) @@ -544,11 +515,7 @@ public static IQueryable Defer(this IQueryProvider provider, E return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Defer(default(IQueryProvider), default(Expression>>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), enumerableFactory ) @@ -588,11 +555,7 @@ public static IQueryable Generate(this IQueryProvider return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Generate(default(IQueryProvider), default(TState), default(Expression>), default(Expression>), default(Expression>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TState), typeof(TResult)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), Expression.Constant(initialState), condition, @@ -631,11 +594,7 @@ public static IQueryable Using(this IQueryProvider return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Using(default(IQueryProvider), default(Expression>), default(Expression>>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResource)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), resourceFactory, enumerableFactory @@ -666,11 +625,7 @@ public static IEnumerable Repeat(this IQueryProvider provider, return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Repeat(default(IQueryProvider), default(TResult))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), Expression.Constant(value, typeof(TResult)) ) @@ -704,11 +659,7 @@ public static IQueryable Catch(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Catch(default(IQueryable), default(Expression>>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TException)), -#endif source.Expression, handler ) @@ -738,11 +689,7 @@ public static IQueryable Catch(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Catch(default(IQueryable>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif sources.Expression ) ); @@ -773,11 +720,7 @@ public static IQueryable Catch(this IQueryProvider provider, p return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Catch(default(IQueryProvider), default(IEnumerable[]))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), GetSourceExpression(sources) ) @@ -809,11 +752,7 @@ public static IQueryable Catch(this IQueryable first, return first.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Catch(default(IQueryable), default(IEnumerable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif first.Expression, GetSourceExpression(second) ) @@ -845,11 +784,7 @@ public static IQueryable Finally(this IQueryable sour return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Finally(default(IQueryable), default(Expression))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, finallyAction ) @@ -881,11 +816,7 @@ public static IQueryable OnErrorResumeNext(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.OnErrorResumeNext(default(IQueryable), default(IEnumerable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif first.Expression, GetSourceExpression(second) ) @@ -917,11 +848,7 @@ public static IEnumerable OnErrorResumeNext(this IQueryProvide return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.OnErrorResumeNext(default(IQueryProvider), default(IEnumerable[]))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), GetSourceExpression(sources) ) @@ -950,11 +877,7 @@ public static IQueryable OnErrorResumeNext(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.OnErrorResumeNext(default(IQueryable>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif sources.Expression ) ); @@ -982,11 +905,7 @@ public static IQueryable Retry(this IQueryable source return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Retry(default(IQueryable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression ) ); @@ -1015,11 +934,7 @@ public static IQueryable Retry(this IQueryable source return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Retry(default(IQueryable), default(int))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, Expression.Constant(retryCount, typeof(int)) ) @@ -1054,11 +969,7 @@ public static IQueryable While(this IQueryProvider provider, E return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.While(default(IQueryProvider), default(Expression>), default(IEnumerable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), condition, GetSourceExpression(source) @@ -1097,11 +1008,7 @@ public static IQueryable If(this IQueryProvider provider, Expr return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.If(default(IQueryProvider), default(Expression>), default(IEnumerable), default(IEnumerable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), condition, GetSourceExpression(thenSource), @@ -1138,11 +1045,7 @@ public static IQueryable If(this IQueryProvider provider, Expr return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.If(default(IQueryProvider), default(Expression>), default(IEnumerable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), condition, GetSourceExpression(thenSource) @@ -1175,11 +1078,7 @@ public static IQueryable DoWhile(this IQueryable sour return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.DoWhile(default(IQueryable), default(Expression>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), -#endif source.Expression, condition ) @@ -1215,11 +1114,7 @@ public static IQueryable Case(this IQueryProvider prov return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Case(default(IQueryProvider), default(Expression>), default(IDictionary>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TValue), typeof(TResult)), -#endif selector, Expression.Constant(sources, typeof(IDictionary>)) ) @@ -1258,11 +1153,7 @@ public static IQueryable Case(this IQueryProvider prov return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Case(default(IQueryProvider), default(Expression>), default(IDictionary>), default(IEnumerable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TValue), typeof(TResult)), -#endif selector, Expression.Constant(sources, typeof(IDictionary>)) ) @@ -1298,11 +1189,7 @@ public static IQueryable For(this IQueryProvider prov return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.For(default(IQueryProvider), default(IEnumerable), default(Expression>>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), -#endif GetSourceExpression(source), resultSelector ) @@ -1331,11 +1218,7 @@ public static IQueryable Concat(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Concat(default(IQueryable>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif GetSourceExpression(sources) ) ); @@ -1366,11 +1249,7 @@ public static IQueryable Concat(this IQueryProvider provider, return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Concat(default(IQueryProvider), default(IEnumerable[]))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), GetSourceExpression(sources) ) @@ -1403,11 +1282,7 @@ public static IQueryable SelectMany(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.SelectMany(default(IQueryable), default(IEnumerable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TOther)), -#endif source.Expression, GetSourceExpression(other) ) @@ -1437,11 +1312,7 @@ public static IQueryable Hide(this IQueryable source) return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Hide(default(IQueryable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression ) ); @@ -1472,11 +1343,7 @@ public static IQueryable Do(this IQueryable source, E return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Do(default(IQueryable), default(Expression>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, onNext ) @@ -1511,11 +1378,7 @@ public static IQueryable Do(this IQueryable source, E return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Do(default(IQueryable), default(Expression>), default(Expression))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, onNext, onCompleted @@ -1551,11 +1414,7 @@ public static IQueryable Do(this IQueryable source, E return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Do(default(IQueryable), default(Expression>), default(Expression>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, onNext, onError @@ -1594,11 +1453,7 @@ public static IQueryable Do(this IQueryable source, E return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Do(default(IQueryable), default(Expression>), default(Expression>), default(Expression))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, onNext, onError, @@ -1632,11 +1487,7 @@ public static IQueryable Do(this IQueryable source, I return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Do(default(IQueryable), default(IObserver))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, Expression.Constant(observer, typeof(IObserver)) ) @@ -1666,11 +1517,7 @@ public static IQueryable> Buffer(this IQueryable>( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Buffer(default(IQueryable), default(int))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, Expression.Constant(count, typeof(int)) ) @@ -1701,11 +1548,7 @@ public static IQueryable> Buffer(this IQueryable>( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Buffer(default(IQueryable), default(int), default(int))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, Expression.Constant(count, typeof(int)), Expression.Constant(skip, typeof(int)) @@ -1735,11 +1578,7 @@ public static IQueryable IgnoreElements(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.IgnoreElements(default(IQueryable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression ) ); @@ -1771,11 +1610,7 @@ public static IQueryable Distinct(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Distinct(default(IQueryable), default(Expression>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), -#endif source.Expression, keySelector ) @@ -1811,11 +1646,7 @@ public static IQueryable Distinct(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Distinct(default(IQueryable), default(Expression>), default(IEqualityComparer))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), -#endif source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)) @@ -1845,11 +1676,7 @@ public static IQueryable DistinctUntilChanged(this IQueryable< return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.DistinctUntilChanged(default(IQueryable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression ) ); @@ -1880,11 +1707,7 @@ public static IQueryable DistinctUntilChanged(this IQueryable< return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.DistinctUntilChanged(default(IQueryable), default(IEqualityComparer))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, Expression.Constant(comparer, typeof(IEqualityComparer)) ) @@ -1917,11 +1740,7 @@ public static IQueryable DistinctUntilChanged(this IQuer return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.DistinctUntilChanged(default(IQueryable), default(Expression>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), -#endif source.Expression, keySelector ) @@ -1957,11 +1776,7 @@ public static IQueryable DistinctUntilChanged(this IQuer return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.DistinctUntilChanged(default(IQueryable), default(Expression>), default(IEqualityComparer))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TKey)), -#endif source.Expression, keySelector, Expression.Constant(comparer, typeof(IEqualityComparer)) @@ -1994,11 +1809,7 @@ public static IQueryable Expand(this IQueryable sourc return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Expand(default(IQueryable), default(Expression>>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, selector ) @@ -2028,11 +1839,7 @@ public static IQueryable StartWith(this IQueryable so return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.StartWith(default(IQueryable), default(TSource[]))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, Expression.Constant(values, typeof(TSource[])) ) @@ -2066,11 +1873,7 @@ public static IQueryable Scan(this IQueryable return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Scan(default(IQueryable), default(TAccumulate), default(Expression>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TAccumulate)), -#endif source.Expression, Expression.Constant(seed, typeof(TAccumulate)), accumulator @@ -2103,11 +1906,7 @@ public static IQueryable Scan(this IQueryable source, return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Scan(default(IQueryable), default(Expression>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, accumulator ) @@ -2137,11 +1936,7 @@ public static IQueryable TakeLast(this IQueryable sou return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.TakeLast(default(IQueryable), default(int))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, Expression.Constant(count, typeof(int)) ) @@ -2153,7 +1948,7 @@ public static IQueryable TakeLast(this IQueryable sou public static IEnumerable TakeLast(IEnumerable source, int count) { #if REFERENCE_ASSEMBLY - return null; + return Enumerable.TakeLast(source, count); #else return EnumerableEx.TakeLast(source, count); #endif @@ -2175,11 +1970,7 @@ public static IQueryable SkipLast(this IQueryable sou return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.SkipLast(default(IQueryable), default(int))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, Expression.Constant(count, typeof(int)) ) @@ -2212,11 +2003,7 @@ public static IQueryable Repeat(this IQueryable sourc return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Repeat(default(IQueryable))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression ) ); @@ -2245,11 +2032,7 @@ public static IQueryable Repeat(this IQueryable sourc return source.Provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Repeat(default(IQueryable), default(int))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource)), -#endif source.Expression, Expression.Constant(count, typeof(int)) ) @@ -2278,11 +2061,7 @@ public static IQueryable Empty(this IQueryProvider provider) return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Empty(default(IQueryProvider))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), -#endif Expression.Constant(provider, typeof(IQueryProvider)) ) ); @@ -2311,11 +2090,7 @@ public static IQueryable Range(this IQueryProvider provider, int start, int return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Range(default(IQueryProvider), default(int), default(int))), -#else (MethodInfo)MethodInfo.GetCurrentMethod(), -#endif Expression.Constant(provider, typeof(IQueryProvider)), Expression.Constant(start, typeof(int)), Expression.Constant(count, typeof(int)) @@ -2347,11 +2122,7 @@ public static IQueryable Repeat(this IQueryProvider provider, return provider.CreateQuery( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Repeat(default(IQueryProvider), default(TResult), default(int))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TResult)), -#endif Expression.Constant(provider, typeof(IQueryProvider)), Expression.Constant(element, typeof(TResult)), Expression.Constant(count, typeof(int)) diff --git a/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.cs b/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.cs index 926deba73a..5d206944c0 100644 --- a/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.cs +++ b/Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncQueryable.cs @@ -34,7 +34,6 @@ public static IAsyncQueryable AsAsyncQueryable(this IAsyncEn return new AsyncEnumerableQuery(source); } -#if HAS_VALUETUPLE private static MethodInfo? s_Zip__TFirst_TSecond__2__0; private static MethodInfo Zip__TFirst_TSecond__2__0(Type TFirst, Type TSecond) => @@ -50,7 +49,6 @@ private static MethodInfo Zip__TFirst_TSecond__2__0(Type TFirst, Type TSecond) = return first.Provider.CreateQuery<(TFirst, TSecond)>(Expression.Call(Zip__TFirst_TSecond__2__0(typeof(TFirst), typeof(TSecond)), first.Expression, GetSourceExpression(second))); } -#endif private static Expression GetSourceExpression(IAsyncEnumerable source) { diff --git a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Zip.cs b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Zip.cs index ebba9d5063..80df0f09a1 100644 --- a/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Zip.cs +++ b/Ix.NET/Source/System.Linq.Async.Tests/System/Linq/Operators/Zip.cs @@ -302,7 +302,6 @@ public async Task ZipAwaitWithCancellation_SequenceIdentity() } #endif -#if HAS_VALUETUPLE [Fact] public void Zip_Tuple_Null() { @@ -385,6 +384,5 @@ public async Task Zip_Tuple_SequenceIdentity() await SequenceIdentity(res); } -#endif } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs index c783ddd17d..ec2a49f0d7 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs @@ -10,7 +10,6 @@ namespace System.Linq { public static partial class AsyncEnumerable { -#if HAS_VALUETUPLE public static IAsyncEnumerable<(TFirst First, TSecond Second)> Zip(this IAsyncEnumerable first, IAsyncEnumerable second) { if (first == null) @@ -31,7 +30,6 @@ public static partial class AsyncEnumerable } } } -#endif /// /// Merges two async-enumerable sequences into one async-enumerable sequence by combining their elements in a pairwise fashion. From 7ad6e8f91f723e07ea697cc3fb99ebdae2f1db20 Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Mon, 6 Dec 2021 12:29:55 -0500 Subject: [PATCH 3/4] Remove old runtimes from ci --- azure-pipelines.ix.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/azure-pipelines.ix.yml b/azure-pipelines.ix.yml index c5c2d1e64b..758943f21e 100644 --- a/azure-pipelines.ix.yml +++ b/azure-pipelines.ix.yml @@ -36,23 +36,11 @@ stages: inputs: version: 6.x - - task: UseDotNet@2 - displayName: .NET Core 5.0 runtime - inputs: - version: '5.0.x' - packageType: runtime - - task: UseDotNet@2 displayName: .NET Core 3.1 runtime inputs: version: '3.1.x' packageType: runtime - - - task: UseDotNet@2 - displayName: .NET Core 2.1 runtime - inputs: - version: '2.1.x' - packageType: runtime - task: DotNetCoreCLI@2 inputs: From 1ac8186d0efffe6f39dedb9ec8cde5b2b57d47da Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Mon, 6 Dec 2021 12:43:00 -0500 Subject: [PATCH 4/4] Fix impls for ref assms --- .../System/Linq/QueryableEx.Generated.cs | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/Ix.NET/Source/System.Interactive.Providers/System/Linq/QueryableEx.Generated.cs b/Ix.NET/Source/System.Interactive.Providers/System/Linq/QueryableEx.Generated.cs index 5d3a4a0a60..ac2b9f65f7 100644 --- a/Ix.NET/Source/System.Interactive.Providers/System/Linq/QueryableEx.Generated.cs +++ b/Ix.NET/Source/System.Interactive.Providers/System/Linq/QueryableEx.Generated.cs @@ -67,8 +67,8 @@ public static TSource Min(this IQueryable source, IComparer(IEnumerable source, IComparer comparer) { -#if NET6_0 - return Enumerable.Min(source, comparer); +#if REFERENCE_ASSEMBLY + return default; #else return EnumerableEx.Min(source, comparer); @@ -105,7 +105,11 @@ public static IList MinBy(this IQueryable sourc [EditorBrowsable(EditorBrowsableState.Never)] public static IList MinBy(IEnumerable source, Func keySelector) { +#if REFERENCE_ASSEMBLY + return default; +#else return EnumerableEx.MinBy(source, keySelector); +#endif } #pragma warning restore 1591 @@ -142,11 +146,8 @@ public static IList MinBy(this IQueryable sourc [EditorBrowsable(EditorBrowsableState.Never)] public static IList MinBy(IEnumerable source, Func keySelector, IComparer comparer) { -#if NET6_0 - return new List() - { - Enumerable.MinBy(source, keySelector, comparer) - }; +#if REFERENCE_ASSEMBLY + return default; #else return EnumerableEx.MinBy(source, keySelector, comparer); #endif @@ -181,8 +182,8 @@ public static TSource Max(this IQueryable source, IComparer(IEnumerable source, IComparer comparer) { -#if NET6_0 - return Enumerable.Max(source, comparer); +#if REFERENCE_ASSEMBLY + return default; #else return EnumerableEx.Max(source, comparer); #endif @@ -218,7 +219,11 @@ public static IList MaxBy(this IQueryable sourc [EditorBrowsable(EditorBrowsableState.Never)] public static IList MaxBy(IEnumerable source, Func keySelector) { +#if REFERENCE_ASSEMBLY + return default; +#else return EnumerableEx.MaxBy(source, keySelector); +#endif } #pragma warning restore 1591 @@ -255,11 +260,8 @@ public static IList MaxBy(this IQueryable sourc [EditorBrowsable(EditorBrowsableState.Never)] public static IList MaxBy(IEnumerable source, Func keySelector, IComparer comparer) { -#if NET6_0 - return new List - { - Enumerable.MaxBy(source, keySelector, comparer) - }; +#if REFERENCE_ASSEMBLY + return default; #else return EnumerableEx.MaxBy(source, keySelector, comparer); #endif @@ -284,11 +286,7 @@ public static IQueryable Share(this IQueryable( Expression.Call( null, -#if CRIPPLED_REFLECTION - InfoOf(() => QueryableEx.Share(default(IQueryable), default(Expression, IEnumerable>>))), -#else ((MethodInfo)MethodInfo.GetCurrentMethod()).MakeGenericMethod(typeof(TSource), typeof(TResult)), -#endif source.Expression, selector ) @@ -1948,7 +1946,7 @@ public static IQueryable TakeLast(this IQueryable sou public static IEnumerable TakeLast(IEnumerable source, int count) { #if REFERENCE_ASSEMBLY - return Enumerable.TakeLast(source, count); + return default; #else return EnumerableEx.TakeLast(source, count); #endif @@ -1982,7 +1980,7 @@ public static IQueryable SkipLast(this IQueryable sou public static IEnumerable SkipLast(IEnumerable source, int count) { #if REFERENCE_ASSEMBLY - return null; + return default; #else return EnumerableEx.SkipLast(source, count); #endif