From cd942145dade57b34d0dfed62b7f7409c2f6bdcc Mon Sep 17 00:00:00 2001 From: Koen Date: Sun, 2 Aug 2026 00:18:50 +0000 Subject: [PATCH] use 32bit file tags --- .../PolyfillInterceptorGenerator.cs | 4 +- .../Infrastructure/GeneratorTestBase.cs | 18 +++ ...regateBy_GeneratesInterceptor.verified.txt | 18 +-- ...Selector_GeneratesInterceptor.verified.txt | 24 ++-- ...ct_GeneratesScalarInterceptor.verified.txt | 26 ++--- ...usSelect_GeneratesInterceptor.verified.txt | 22 ++-- ...usSelect_GeneratesInterceptor.verified.txt | 22 ++-- ...usSelect_GeneratesInterceptor.verified.txt | 22 ++-- ...usSelect_GeneratesInterceptor.verified.txt | 22 ++-- ...usSelect_GeneratesInterceptor.verified.txt | 26 ++--- ...Comparer_GeneratesInterceptor.verified.txt | 8 +- ...Comparer_GeneratesInterceptor.verified.txt | 8 +- ...Comparer_GeneratesInterceptor.verified.txt | 8 +- ...ateAsync_GeneratesInterceptor.verified.txt | 16 +-- ...ate_SetProperty_ConstantValue.verified.txt | 16 +-- ...tProperty_WithNullConditional.verified.txt | 34 +++--- ...Property_WithSwitchExpression.verified.txt | 38 +++--- .../GeneratedOutputCompilationTests.cs | 108 ++++++++++++++++++ ...ditionalIgnore_UsesIgnoreMode.verified.txt | 20 ++-- ...AppliesWithoutPerCallOverride.verified.txt | 22 ++-- ....Where_PerCallOverridesGlobal.verified.txt | 22 ++-- ...y_GeneratesGroupingReturnType.verified.txt | 8 +- ...Selector_GeneratesInterceptor.verified.txt | 20 ++-- ...Selector_GeneratesInterceptor.verified.txt | 14 +-- ...Selector_GeneratesInterceptor.verified.txt | 14 +-- ...r_GeneratesGenericInterceptor.verified.txt | 28 ++--- ...roupJoin_GeneratesInterceptor.verified.txt | 22 ++-- ...r_GeneratesGenericInterceptor.verified.txt | 28 ++--- ...sts.Join_GeneratesInterceptor.verified.txt | 30 ++--- ...nalRewrite_ExpandsInWhereBody.verified.txt | 22 ++-- ....OrderBy_GeneratesInterceptor.verified.txt | 8 +- ...enBy_CastsToIOrderedQueryable.verified.txt | 16 +-- ...lTarget_RoutesToSpecifiedType.verified.txt | 8 +- ...Attribute_DefaultsToQueryable.verified.txt | 8 +- ...riable_GeneratesClosureAccess.verified.txt | 12 +- ...eArgument_GeneratesExpression.verified.txt | 12 +- ...lConditional_RewritesOperator.verified.txt | 20 ++-- ...pleLambda_GeneratesExpression.verified.txt | 12 +- ...ll_GeneratesScalarInterceptor.verified.txt | 8 +- ...ny_GeneratesScalarInterceptor.verified.txt | 12 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...nt_GeneratesScalarInterceptor.verified.txt | 12 +- ...lt_GeneratesScalarInterceptor.verified.txt | 8 +- ...st_GeneratesScalarInterceptor.verified.txt | 8 +- ...lt_GeneratesScalarInterceptor.verified.txt | 8 +- ...st_GeneratesScalarInterceptor.verified.txt | 8 +- ...nt_GeneratesScalarInterceptor.verified.txt | 12 +- ...By_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...By_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...lt_GeneratesScalarInterceptor.verified.txt | 8 +- ...le_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...or_GeneratesScalarInterceptor.verified.txt | 8 +- ...Selector_GeneratesInterceptor.verified.txt | 10 +- ...Selector_GeneratesInterceptor.verified.txt | 24 ++-- ...e_GeneratesGenericInterceptor.verified.txt | 14 +-- ...Expression_GeneratesCorrectly.verified.txt | 20 ++-- ..._GeneratesConcreteInterceptor.verified.txt | 8 +- ...ExceptBy_GeneratesInterceptor.verified.txt | 8 +- ...ersectBy_GeneratesInterceptor.verified.txt | 8 +- ....UnionBy_GeneratesInterceptor.verified.txt | 8 +- ....CountBy_GeneratesInterceptor.verified.txt | 8 +- ...stinctBy_GeneratesInterceptor.verified.txt | 8 +- ...scending_GeneratesInterceptor.verified.txt | 8 +- ...kipWhile_GeneratesInterceptor.verified.txt | 12 +- ...akeWhile_GeneratesInterceptor.verified.txt | 8 +- ...scending_GeneratesInterceptor.verified.txt | 16 +-- ...ReferencesSynthesizedProperty.verified.txt | 8 +- ...ReferencesSynthesizedProperty.verified.txt | 24 ++-- ...lect_GeneratesTwoInterceptors.verified.txt | 20 ++-- ...eField_GeneratesClosureAccess.verified.txt | 12 +- ...riable_GeneratesClosureAccess.verified.txt | 12 +- ...ondition_GeneratesInterceptor.verified.txt | 12 +- ...Selector_GeneratesInterceptor.verified.txt | 10 +- 93 files changed, 727 insertions(+), 601 deletions(-) create mode 100644 tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GeneratedOutputCompilationTests.cs diff --git a/src/ExpressiveSharp.Generator/PolyfillInterceptorGenerator.cs b/src/ExpressiveSharp.Generator/PolyfillInterceptorGenerator.cs index bbd2391e..8ab40c74 100644 --- a/src/ExpressiveSharp.Generator/PolyfillInterceptorGenerator.cs +++ b/src/ExpressiveSharp.Generator/PolyfillInterceptorGenerator.cs @@ -316,7 +316,7 @@ private static string ComputeOutputFileName(string sourcePath) } } - /// 4-char hex tag from source path hash; disambiguates same-line/col call sites across files. + /// 8-char hex tag from source path hash; disambiguates same-line/col call sites across files. private static string GetFileTag(string sourcePath) { unchecked @@ -327,7 +327,7 @@ private static string GetFileTag(string sourcePath) hash ^= (uint)sourcePath[i]; hash *= 16777619u; } - return (hash & 0xFFFFu).ToString("x4"); + return hash.ToString("x8"); } } diff --git a/tests/ExpressiveSharp.Generator.Tests/Infrastructure/GeneratorTestBase.cs b/tests/ExpressiveSharp.Generator.Tests/Infrastructure/GeneratorTestBase.cs index af8f79ad..8071ff68 100644 --- a/tests/ExpressiveSharp.Generator.Tests/Infrastructure/GeneratorTestBase.cs +++ b/tests/ExpressiveSharp.Generator.Tests/Infrastructure/GeneratorTestBase.cs @@ -96,6 +96,24 @@ protected Compilation CreateCompilation([StringSyntax("csharp")] string source, return compilation; } + protected Compilation CreateCompilation(params (string Source, string Path)[] sources) + { + var parseOptions = CreateParseOptions(); + var trees = new List + { + CSharpSyntaxTree.ParseText(GlobalUsings, parseOptions, "GlobalUsings.cs"), + }; + trees.AddRange(sources.Select(s => CSharpSyntaxTree.ParseText(s.Source, parseOptions, s.Path))); + var compilation = CSharpCompilation.Create( + "compilation", + trees, + GetDefaultReferences(), + new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)); + + LogSourceDiagnostics(compilation); + return compilation; + } + protected Compilation CreateCompilation(params string[] sources) { var parseOptions = CreateParseOptions(); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AggregateByTests.AggregateBy_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AggregateByTests.AggregateBy_GeneratesInterceptor.verified.txt index 463185a2..739a754c 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AggregateByTests.AggregateBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AggregateByTests.AggregateBy_GeneratesInterceptor.verified.txt @@ -6,22 +6,22 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_AggregateBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_AggregateBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func1, decimal seed, global::System.Func __func2) { // Source: o => o.Tag - var i361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18a_expr_0, i361d10c18a_p_o); + var id115361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18a_expr_0, id115361d10c18a_p_o); // Source: (acc, o) => acc + o.Price - var i361d10c18b_p_acc = global::System.Linq.Expressions.Expression.Parameter(typeof(decimal), "acc"); - var i361d10c18b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18b_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d10c18b_p_o, typeof(global::TestNs.Order).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price - var i361d10c18b_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Add, i361d10c18b_p_acc, i361d10c18b_expr_1); - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18b_expr_0, i361d10c18b_p_acc, i361d10c18b_p_o); + var id115361d10c18b_p_acc = global::System.Linq.Expressions.Expression.Parameter(typeof(decimal), "acc"); + var id115361d10c18b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18b_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d10c18b_p_o, typeof(global::TestNs.Order).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price + var id115361d10c18b_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Add, id115361d10c18b_p_acc, id115361d10c18b_expr_1); + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18b_expr_0, id115361d10c18b_p_acc, id115361d10c18b_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.AggregateBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AggregateByTests.AggregateBy_WithSeedSelector_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AggregateByTests.AggregateBy_WithSeedSelector_GeneratesInterceptor.verified.txt index f89dfaea..bf0eea5c 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AggregateByTests.AggregateBy_WithSeedSelector_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AggregateByTests.AggregateBy_WithSeedSelector_GeneratesInterceptor.verified.txt @@ -6,26 +6,26 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_AggregateBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_AggregateBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func1, global::System.Func __func2, global::System.Func __func3) { // Source: o => o.Tag - var i361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18a_expr_0, i361d10c18a_p_o); + var id115361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18a_expr_0, id115361d10c18a_p_o); // Source: k => 0m - var i361d10c18b_p_k = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "k"); - var i361d10c18b_expr_0 = global::System.Linq.Expressions.Expression.Constant(0m, typeof(decimal)); // 0m - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18b_expr_0, i361d10c18b_p_k); + var id115361d10c18b_p_k = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "k"); + var id115361d10c18b_expr_0 = global::System.Linq.Expressions.Expression.Constant(0m, typeof(decimal)); // 0m + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18b_expr_0, id115361d10c18b_p_k); // Source: (acc, o) => acc + o.Price - var i361d10c18c_p_acc = global::System.Linq.Expressions.Expression.Parameter(typeof(decimal), "acc"); - var i361d10c18c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18c_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d10c18c_p_o, typeof(global::TestNs.Order).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price - var i361d10c18c_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Add, i361d10c18c_p_acc, i361d10c18c_expr_1); - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18c_expr_0, i361d10c18c_p_acc, i361d10c18c_p_o); + var id115361d10c18c_p_acc = global::System.Linq.Expressions.Expression.Parameter(typeof(decimal), "acc"); + var id115361d10c18c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18c_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d10c18c_p_o, typeof(global::TestNs.Order).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price + var id115361d10c18c_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Add, id115361d10c18c_p_acc, id115361d10c18c_expr_1); + var __lambda3 = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18c_expr_0, id115361d10c18c_p_acc, id115361d10c18c_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.AggregateBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Count_AfterAnonymousSelect_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Count_AfterAnonymousSelect_GeneratesScalarInterceptor.verified.txt index 83ec57cf..7b0c9c94 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Count_AfterAnonymousSelect_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Count_AfterAnonymousSelect_GeneratesScalarInterceptor.verified.txt @@ -6,32 +6,32 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_Count_361d_11_25( + internal static int __Polyfill_Count_d115361d_11_25( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Total > 0m - var i361d11c25_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i361d11c25_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d11c25_p_x, typeof(T0).GetProperty("Total", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Total - var i361d11c25_expr_2 = global::System.Linq.Expressions.Expression.Constant(0m, typeof(decimal)); // 0m - var i361d11c25_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i361d11c25_expr_1, i361d11c25_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c25_expr_0, i361d11c25_p_x); + var id115361d11c25_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); + var id115361d11c25_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d11c25_p_x, typeof(T0).GetProperty("Total", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Total + var id115361d11c25_expr_2 = global::System.Linq.Expressions.Expression.Constant(0m, typeof(decimal)); // 0m + var id115361d11c25_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, id115361d11c25_expr_1, id115361d11c25_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c25_expr_0, id115361d11c25_p_x); return global::System.Linq.Queryable.Count( (global::System.Linq.IQueryable)(object)source, __lambda); } [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_25( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_10_25( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Total } - var i361d10c25_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d10c25_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d10c25_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id - var i361d10c25_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c25_p_o, typeof(T0).GetProperty("Total", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Total - var i361d10c25_expr_3 = typeof(T1).GetConstructors()[0]; - var i361d10c25_expr_0 = global::System.Linq.Expressions.Expression.New(i361d10c25_expr_3, new global::System.Linq.Expressions.Expression[] { i361d10c25_expr_1, i361d10c25_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Total") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c25_expr_0, i361d10c25_p_o); + var id115361d10c25_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d10c25_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d10c25_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id + var id115361d10c25_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d10c25_p_o, typeof(T0).GetProperty("Total", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Total + var id115361d10c25_expr_3 = typeof(T1).GetConstructors()[0]; + var id115361d10c25_expr_0 = global::System.Linq.Expressions.Expression.New(id115361d10c25_expr_3, new global::System.Linq.Expressions.Expression[] { id115361d10c25_expr_1, id115361d10c25_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Total") }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c25_expr_0, id115361d10c25_p_o); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.DistinctBy_AfterAnonymousSelect_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.DistinctBy_AfterAnonymousSelect_GeneratesInterceptor.verified.txt index 09ac24be..65e9b7b4 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.DistinctBy_AfterAnonymousSelect_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.DistinctBy_AfterAnonymousSelect_GeneratesInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_361d_11_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_d115361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Category - var i361d11c18_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c18_p_x, typeof(T0).GetProperty("Category", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Category - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_x); + var id115361d11c18_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); + var id115361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_p_x, typeof(T0).GetProperty("Category", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Category + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c18_expr_0, id115361d11c18_p_x); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.DistinctBy( @@ -21,17 +21,17 @@ namespace ExpressiveSharp.Generated.Interceptors __lambda)); } [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Category } - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id - var i361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Category", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Category - var i361d10c18_expr_3 = typeof(T1).GetConstructors()[0]; - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.New(i361d10c18_expr_3, new global::System.Linq.Expressions.Expression[] { i361d10c18_expr_1, i361d10c18_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Category") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id + var id115361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(T0).GetProperty("Category", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Category + var id115361d10c18_expr_3 = typeof(T1).GetConstructors()[0]; + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.New(id115361d10c18_expr_3, new global::System.Linq.Expressions.Expression[] { id115361d10c18_expr_1, id115361d10c18_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Category") }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.GroupBy_AfterAnonymousSelect_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.GroupBy_AfterAnonymousSelect_GeneratesInterceptor.verified.txt index d4dfb034..5fa80e4b 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.GroupBy_AfterAnonymousSelect_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.GroupBy_AfterAnonymousSelect_GeneratesInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_361d_11_18( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_d115361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Category - var i361d11c18_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c18_p_x, typeof(T0).GetProperty("Category", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Category - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_x); + var id115361d11c18_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); + var id115361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_p_x, typeof(T0).GetProperty("Category", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Category + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c18_expr_0, id115361d11c18_p_x); return (global::ExpressiveSharp.IExpressiveQueryable>)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.GroupBy( @@ -21,17 +21,17 @@ namespace ExpressiveSharp.Generated.Interceptors __lambda)); } [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Category } - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id - var i361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Category", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Category - var i361d10c18_expr_3 = typeof(T1).GetConstructors()[0]; - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.New(i361d10c18_expr_3, new global::System.Linq.Expressions.Expression[] { i361d10c18_expr_1, i361d10c18_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Category") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id + var id115361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(T0).GetProperty("Category", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Category + var id115361d10c18_expr_3 = typeof(T1).GetConstructors()[0]; + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.New(id115361d10c18_expr_3, new global::System.Linq.Expressions.Expression[] { id115361d10c18_expr_1, id115361d10c18_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Category") }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.OrderByDescending_AfterAnonymousSelect_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.OrderByDescending_AfterAnonymousSelect_GeneratesInterceptor.verified.txt index 56b74d56..e2662b91 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.OrderByDescending_AfterAnonymousSelect_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.OrderByDescending_AfterAnonymousSelect_GeneratesInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderByDescending_361d_11_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderByDescending_d115361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Name - var i361d11c18_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c18_p_x, typeof(T0).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_x); + var id115361d11c18_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); + var id115361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_p_x, typeof(T0).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c18_expr_0, id115361d11c18_p_x); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.OrderByDescending( @@ -21,17 +21,17 @@ namespace ExpressiveSharp.Generated.Interceptors __lambda)); } [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Name } - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id - var i361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var i361d10c18_expr_3 = typeof(T1).GetConstructors()[0]; - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.New(i361d10c18_expr_3, new global::System.Linq.Expressions.Expression[] { i361d10c18_expr_1, i361d10c18_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Name") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id + var id115361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(T0).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var id115361d10c18_expr_3 = typeof(T1).GetConstructors()[0]; + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.New(id115361d10c18_expr_3, new global::System.Linq.Expressions.Expression[] { id115361d10c18_expr_1, id115361d10c18_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Name") }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Select_AfterAnonymousSelect_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Select_AfterAnonymousSelect_GeneratesInterceptor.verified.txt index ae7a9ca9..0c6464db 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Select_AfterAnonymousSelect_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Select_AfterAnonymousSelect_GeneratesInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_11_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Id - var i361d11c18_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c18_p_x, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Id - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_x); + var id115361d11c18_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); + var id115361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_p_x, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Id + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c18_expr_0, id115361d11c18_p_x); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( @@ -21,17 +21,17 @@ namespace ExpressiveSharp.Generated.Interceptors __lambda)); } [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Name } - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id - var i361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var i361d10c18_expr_3 = typeof(T1).GetConstructors()[0]; - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.New(i361d10c18_expr_3, new global::System.Linq.Expressions.Expression[] { i361d10c18_expr_1, i361d10c18_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Name") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id + var id115361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(T0).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var id115361d10c18_expr_3 = typeof(T1).GetConstructors()[0]; + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.New(id115361d10c18_expr_3, new global::System.Linq.Expressions.Expression[] { id115361d10c18_expr_1, id115361d10c18_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Name") }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Where_AfterAnonymousSelect_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Where_AfterAnonymousSelect_GeneratesInterceptor.verified.txt index cd5d8145..cbeae74f 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Where_AfterAnonymousSelect_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AnonymousElementTests.Where_AfterAnonymousSelect_GeneratesInterceptor.verified.txt @@ -6,16 +6,16 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_11_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_d115361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Total > 100m - var i361d11c18_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i361d11c18_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d11c18_p_x, typeof(T0).GetProperty("Total", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Total - var i361d11c18_expr_2 = global::System.Linq.Expressions.Expression.Constant(100m, typeof(decimal)); // 100m - var i361d11c18_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i361d11c18_expr_1, i361d11c18_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_x); + var id115361d11c18_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); + var id115361d11c18_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_p_x, typeof(T0).GetProperty("Total", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // x.Total + var id115361d11c18_expr_2 = global::System.Linq.Expressions.Expression.Constant(100m, typeof(decimal)); // 100m + var id115361d11c18_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, id115361d11c18_expr_1, id115361d11c18_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c18_expr_0, id115361d11c18_p_x); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Where( @@ -23,17 +23,17 @@ namespace ExpressiveSharp.Generated.Interceptors __lambda)); } [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Total } - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id - var i361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Total", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Total - var i361d10c18_expr_3 = typeof(T1).GetConstructors()[0]; - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.New(i361d10c18_expr_3, new global::System.Linq.Expressions.Expression[] { i361d10c18_expr_1, i361d10c18_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Total") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id + var id115361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(T0).GetProperty("Total", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Total + var id115361d10c18_expr_3 = typeof(T1).GetConstructors()[0]; + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.New(id115361d10c18_expr_3, new global::System.Linq.Expressions.Expression[] { id115361d10c18_expr_1, id115361d10c18_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Total") }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.DistinctBy_WithComparer_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.DistinctBy_WithComparer_GeneratesInterceptor.verified.txt index 1f28e796..52104fd5 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.DistinctBy_WithComparer_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.DistinctBy_WithComparer_GeneratesInterceptor.verified.txt @@ -6,15 +6,15 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func, global::System.Collections.Generic.IEqualityComparer comparer) { // Source: o => o.Tag - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.DistinctBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.GroupBy_WithComparer_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.GroupBy_WithComparer_GeneratesInterceptor.verified.txt index 4ea53b4e..7f2f2513 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.GroupBy_WithComparer_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.GroupBy_WithComparer_GeneratesInterceptor.verified.txt @@ -6,15 +6,15 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func, global::System.Collections.Generic.IEqualityComparer comparer) { // Source: o => o.Tag - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.GroupBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.OrderBy_WithComparer_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.OrderBy_WithComparer_GeneratesInterceptor.verified.txt index 8ebcca91..1a729922 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.OrderBy_WithComparer_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ComparerOverloadTests.OrderBy_WithComparer_GeneratesInterceptor.verified.txt @@ -6,15 +6,15 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func, global::System.Collections.Generic.IComparer comparer) { // Source: o => o.Tag - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.OrderBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdateAsync_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdateAsync_GeneratesInterceptor.verified.txt index ea22f6c8..dd450026 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdateAsync_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdateAsync_GeneratesInterceptor.verified.txt @@ -6,19 +6,19 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Threading.Tasks.Task __Polyfill_ExecuteUpdateAsync_361d_58_24( + internal static global::System.Threading.Tasks.Task __Polyfill_ExecuteUpdateAsync_d115361d_58_24( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func, global::TestNs.SetPropertyCalls> __func, global::System.Threading.CancellationToken cancellationToken) { // Source: s => s.SetProperty(o => o.Tag, "updated") - var i361d58c24_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); - var i361d58c24_p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag - var i361d58c24_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d58c24_p_o_1, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var i361d58c24_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i361d58c24_expr_2, i361d58c24_p_o_1); - var i361d58c24_expr_4 = global::System.Linq.Expressions.Expression.Constant("updated", typeof(string)); // "updated" - var i361d58c24_expr_0 = global::System.Linq.Expressions.Expression.Call(i361d58c24_p_s, global::System.Linq.Enumerable.First(global::System.Linq.Enumerable.Where(typeof(global::TestNs.SetPropertyCalls).GetMethods(global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance), m => m.Name == "SetProperty" && m.IsGenericMethodDefinition && m.GetGenericArguments().Length == 1 && m.GetParameters().Length == 2 && m.GetParameters()[0].ParameterType.IsGenericType && !m.GetParameters()[0].ParameterType.IsGenericParameter && m.GetParameters()[1].ParameterType.IsGenericParameter && !m.GetParameters()[1].ParameterType.IsGenericType)).MakeGenericMethod(typeof(string)), new global::System.Linq.Expressions.Expression[] { i361d58c24_expr_3, i361d58c24_expr_4 }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(i361d58c24_expr_0, i361d58c24_p_s); + var id115361d58c24_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); + var id115361d58c24_p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag + var id115361d58c24_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d58c24_p_o_1, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var id115361d58c24_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(id115361d58c24_expr_2, id115361d58c24_p_o_1); + var id115361d58c24_expr_4 = global::System.Linq.Expressions.Expression.Constant("updated", typeof(string)); // "updated" + var id115361d58c24_expr_0 = global::System.Linq.Expressions.Expression.Call(id115361d58c24_p_s, global::System.Linq.Enumerable.First(global::System.Linq.Enumerable.Where(typeof(global::TestNs.SetPropertyCalls).GetMethods(global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance), m => m.Name == "SetProperty" && m.IsGenericMethodDefinition && m.GetGenericArguments().Length == 1 && m.GetParameters().Length == 2 && m.GetParameters()[0].ParameterType.IsGenericType && !m.GetParameters()[0].ParameterType.IsGenericParameter && m.GetParameters()[1].ParameterType.IsGenericParameter && !m.GetParameters()[1].ParameterType.IsGenericType)).MakeGenericMethod(typeof(string)), new global::System.Linq.Expressions.Expression[] { id115361d58c24_expr_3, id115361d58c24_expr_4 }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(id115361d58c24_expr_0, id115361d58c24_p_s); return global::TestNs.MockRelationalExtensions.ExecuteUpdateAsync( (global::System.Linq.IQueryable)source, __lambda, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_ConstantValue.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_ConstantValue.verified.txt index d746d599..f679cf96 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_ConstantValue.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_ConstantValue.verified.txt @@ -6,18 +6,18 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_ExecuteUpdate_361d_58_18( + internal static int __Polyfill_ExecuteUpdate_d115361d_58_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func, global::TestNs.SetPropertyCalls> __func) { // Source: s => s.SetProperty(o => o.Tag, "updated") - var i361d58c18_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); - var i361d58c18_p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag - var i361d58c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d58c18_p_o_1, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var i361d58c18_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i361d58c18_expr_2, i361d58c18_p_o_1); - var i361d58c18_expr_4 = global::System.Linq.Expressions.Expression.Constant("updated", typeof(string)); // "updated" - var i361d58c18_expr_0 = global::System.Linq.Expressions.Expression.Call(i361d58c18_p_s, global::System.Linq.Enumerable.First(global::System.Linq.Enumerable.Where(typeof(global::TestNs.SetPropertyCalls).GetMethods(global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance), m => m.Name == "SetProperty" && m.IsGenericMethodDefinition && m.GetGenericArguments().Length == 1 && m.GetParameters().Length == 2 && m.GetParameters()[0].ParameterType.IsGenericType && !m.GetParameters()[0].ParameterType.IsGenericParameter && m.GetParameters()[1].ParameterType.IsGenericParameter && !m.GetParameters()[1].ParameterType.IsGenericType)).MakeGenericMethod(typeof(string)), new global::System.Linq.Expressions.Expression[] { i361d58c18_expr_3, i361d58c18_expr_4 }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(i361d58c18_expr_0, i361d58c18_p_s); + var id115361d58c18_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); + var id115361d58c18_p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag + var id115361d58c18_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d58c18_p_o_1, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var id115361d58c18_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(id115361d58c18_expr_2, id115361d58c18_p_o_1); + var id115361d58c18_expr_4 = global::System.Linq.Expressions.Expression.Constant("updated", typeof(string)); // "updated" + var id115361d58c18_expr_0 = global::System.Linq.Expressions.Expression.Call(id115361d58c18_p_s, global::System.Linq.Enumerable.First(global::System.Linq.Enumerable.Where(typeof(global::TestNs.SetPropertyCalls).GetMethods(global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance), m => m.Name == "SetProperty" && m.IsGenericMethodDefinition && m.GetGenericArguments().Length == 1 && m.GetParameters().Length == 2 && m.GetParameters()[0].ParameterType.IsGenericType && !m.GetParameters()[0].ParameterType.IsGenericParameter && m.GetParameters()[1].ParameterType.IsGenericParameter && !m.GetParameters()[1].ParameterType.IsGenericType)).MakeGenericMethod(typeof(string)), new global::System.Linq.Expressions.Expression[] { id115361d58c18_expr_3, id115361d58c18_expr_4 }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(id115361d58c18_expr_0, id115361d58c18_p_s); return global::TestNs.MockRelationalExtensions.ExecuteUpdate( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_WithNullConditional.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_WithNullConditional.verified.txt index d1147ffe..45708825 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_WithNullConditional.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_WithNullConditional.verified.txt @@ -6,27 +6,27 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_ExecuteUpdate_361d_63_18( + internal static int __Polyfill_ExecuteUpdate_d115361d_63_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func, global::TestNs.SetPropertyCalls> __func) { // Source: s => s.SetProperty(o => o.Tag, o => o.Customer?.Name ?? "none") - var i361d63c18_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); - var i361d63c18_p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag - var i361d63c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d63c18_p_o_1, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var i361d63c18_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i361d63c18_expr_2, i361d63c18_p_o_1); - var i361d63c18_p_o_4 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Customer?.Name ?? "none" - var i361d63c18_expr_6 = global::System.Linq.Expressions.Expression.Property(i361d63c18_p_o_4, typeof(global::TestNs.Order).GetProperty("Customer", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Customer - var i361d63c18_expr_7 = global::System.Linq.Expressions.Expression.Property(i361d63c18_expr_6, typeof(global::TestNs.Customer).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Name - var i361d63c18_expr_9 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); - var i361d63c18_expr_10 = global::System.Linq.Expressions.Expression.NotEqual(i361d63c18_expr_6, i361d63c18_expr_9); - var i361d63c18_expr_11 = global::System.Linq.Expressions.Expression.Default(typeof(string)); - var i361d63c18_expr_8 = global::System.Linq.Expressions.Expression.Condition(i361d63c18_expr_10, i361d63c18_expr_7, i361d63c18_expr_11, typeof(string)); - var i361d63c18_expr_12 = global::System.Linq.Expressions.Expression.Constant("none", typeof(string)); // "none" - var i361d63c18_expr_5 = global::System.Linq.Expressions.Expression.Coalesce(i361d63c18_expr_8, i361d63c18_expr_12); - var i361d63c18_expr_13 = global::System.Linq.Expressions.Expression.Lambda>(i361d63c18_expr_5, i361d63c18_p_o_4); - var i361d63c18_expr_0 = global::System.Linq.Expressions.Expression.Call(i361d63c18_p_s, global::System.Linq.Enumerable.First(global::System.Linq.Enumerable.Where(typeof(global::TestNs.SetPropertyCalls).GetMethods(global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance), m => m.Name == "SetProperty" && m.IsGenericMethodDefinition && m.GetGenericArguments().Length == 1 && m.GetParameters().Length == 2 && m.GetParameters()[0].ParameterType.IsGenericType && !m.GetParameters()[0].ParameterType.IsGenericParameter && m.GetParameters()[1].ParameterType.IsGenericType && !m.GetParameters()[1].ParameterType.IsGenericParameter)).MakeGenericMethod(typeof(string)), new global::System.Linq.Expressions.Expression[] { i361d63c18_expr_3, i361d63c18_expr_13 }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(i361d63c18_expr_0, i361d63c18_p_s); + var id115361d63c18_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); + var id115361d63c18_p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag + var id115361d63c18_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d63c18_p_o_1, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var id115361d63c18_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(id115361d63c18_expr_2, id115361d63c18_p_o_1); + var id115361d63c18_p_o_4 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Customer?.Name ?? "none" + var id115361d63c18_expr_6 = global::System.Linq.Expressions.Expression.Property(id115361d63c18_p_o_4, typeof(global::TestNs.Order).GetProperty("Customer", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Customer + var id115361d63c18_expr_7 = global::System.Linq.Expressions.Expression.Property(id115361d63c18_expr_6, typeof(global::TestNs.Customer).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Name + var id115361d63c18_expr_9 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); + var id115361d63c18_expr_10 = global::System.Linq.Expressions.Expression.NotEqual(id115361d63c18_expr_6, id115361d63c18_expr_9); + var id115361d63c18_expr_11 = global::System.Linq.Expressions.Expression.Default(typeof(string)); + var id115361d63c18_expr_8 = global::System.Linq.Expressions.Expression.Condition(id115361d63c18_expr_10, id115361d63c18_expr_7, id115361d63c18_expr_11, typeof(string)); + var id115361d63c18_expr_12 = global::System.Linq.Expressions.Expression.Constant("none", typeof(string)); // "none" + var id115361d63c18_expr_5 = global::System.Linq.Expressions.Expression.Coalesce(id115361d63c18_expr_8, id115361d63c18_expr_12); + var id115361d63c18_expr_13 = global::System.Linq.Expressions.Expression.Lambda>(id115361d63c18_expr_5, id115361d63c18_p_o_4); + var id115361d63c18_expr_0 = global::System.Linq.Expressions.Expression.Call(id115361d63c18_p_s, global::System.Linq.Enumerable.First(global::System.Linq.Enumerable.Where(typeof(global::TestNs.SetPropertyCalls).GetMethods(global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance), m => m.Name == "SetProperty" && m.IsGenericMethodDefinition && m.GetGenericArguments().Length == 1 && m.GetParameters().Length == 2 && m.GetParameters()[0].ParameterType.IsGenericType && !m.GetParameters()[0].ParameterType.IsGenericParameter && m.GetParameters()[1].ParameterType.IsGenericType && !m.GetParameters()[1].ParameterType.IsGenericParameter)).MakeGenericMethod(typeof(string)), new global::System.Linq.Expressions.Expression[] { id115361d63c18_expr_3, id115361d63c18_expr_13 }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(id115361d63c18_expr_0, id115361d63c18_p_s); return global::TestNs.MockRelationalExtensions.ExecuteUpdate( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_WithSwitchExpression.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_WithSwitchExpression.verified.txt index 236b4be1..62b7b2d3 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_WithSwitchExpression.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdate_SetProperty_WithSwitchExpression.verified.txt @@ -6,29 +6,29 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_ExecuteUpdate_361d_62_18( + internal static int __Polyfill_ExecuteUpdate_d115361d_62_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func, global::TestNs.SetPropertyCalls> __func) { // Source: s => s.SetProperty(o => o.Tag, o => o.Amount switch { > 100 => "high", > 50 => "medium", _ => "low" }) - var i361d62c18_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); - var i361d62c18_p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag - var i361d62c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d62c18_p_o_1, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var i361d62c18_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i361d62c18_expr_2, i361d62c18_p_o_1); - var i361d62c18_p_o_4 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Amount switch { ... - var i361d62c18_expr_5 = global::System.Linq.Expressions.Expression.Property(i361d62c18_p_o_4, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var i361d62c18_expr_6 = global::System.Linq.Expressions.Expression.Constant("low", typeof(string)); // "low" - var i361d62c18_expr_8 = global::System.Linq.Expressions.Expression.Constant(50, typeof(int)); // 50 - var i361d62c18_expr_7 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i361d62c18_expr_5, i361d62c18_expr_8); - var i361d62c18_expr_9 = global::System.Linq.Expressions.Expression.Constant("medium", typeof(string)); // "medium" - var i361d62c18_expr_10 = global::System.Linq.Expressions.Expression.Condition(i361d62c18_expr_7, i361d62c18_expr_9, i361d62c18_expr_6, typeof(string)); - var i361d62c18_expr_12 = global::System.Linq.Expressions.Expression.Constant(100, typeof(int)); // 100 - var i361d62c18_expr_11 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i361d62c18_expr_5, i361d62c18_expr_12); - var i361d62c18_expr_13 = global::System.Linq.Expressions.Expression.Constant("high", typeof(string)); // "high" - var i361d62c18_expr_14 = global::System.Linq.Expressions.Expression.Condition(i361d62c18_expr_11, i361d62c18_expr_13, i361d62c18_expr_10, typeof(string)); - var i361d62c18_expr_15 = global::System.Linq.Expressions.Expression.Lambda>(i361d62c18_expr_14, i361d62c18_p_o_4); - var i361d62c18_expr_0 = global::System.Linq.Expressions.Expression.Call(i361d62c18_p_s, global::System.Linq.Enumerable.First(global::System.Linq.Enumerable.Where(typeof(global::TestNs.SetPropertyCalls).GetMethods(global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance), m => m.Name == "SetProperty" && m.IsGenericMethodDefinition && m.GetGenericArguments().Length == 1 && m.GetParameters().Length == 2 && m.GetParameters()[0].ParameterType.IsGenericType && !m.GetParameters()[0].ParameterType.IsGenericParameter && m.GetParameters()[1].ParameterType.IsGenericType && !m.GetParameters()[1].ParameterType.IsGenericParameter)).MakeGenericMethod(typeof(string)), new global::System.Linq.Expressions.Expression[] { i361d62c18_expr_3, i361d62c18_expr_15 }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(i361d62c18_expr_0, i361d62c18_p_s); + var id115361d62c18_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); + var id115361d62c18_p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag + var id115361d62c18_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d62c18_p_o_1, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var id115361d62c18_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(id115361d62c18_expr_2, id115361d62c18_p_o_1); + var id115361d62c18_p_o_4 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Amount switch { ... + var id115361d62c18_expr_5 = global::System.Linq.Expressions.Expression.Property(id115361d62c18_p_o_4, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var id115361d62c18_expr_6 = global::System.Linq.Expressions.Expression.Constant("low", typeof(string)); // "low" + var id115361d62c18_expr_8 = global::System.Linq.Expressions.Expression.Constant(50, typeof(int)); // 50 + var id115361d62c18_expr_7 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, id115361d62c18_expr_5, id115361d62c18_expr_8); + var id115361d62c18_expr_9 = global::System.Linq.Expressions.Expression.Constant("medium", typeof(string)); // "medium" + var id115361d62c18_expr_10 = global::System.Linq.Expressions.Expression.Condition(id115361d62c18_expr_7, id115361d62c18_expr_9, id115361d62c18_expr_6, typeof(string)); + var id115361d62c18_expr_12 = global::System.Linq.Expressions.Expression.Constant(100, typeof(int)); // 100 + var id115361d62c18_expr_11 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, id115361d62c18_expr_5, id115361d62c18_expr_12); + var id115361d62c18_expr_13 = global::System.Linq.Expressions.Expression.Constant("high", typeof(string)); // "high" + var id115361d62c18_expr_14 = global::System.Linq.Expressions.Expression.Condition(id115361d62c18_expr_11, id115361d62c18_expr_13, id115361d62c18_expr_10, typeof(string)); + var id115361d62c18_expr_15 = global::System.Linq.Expressions.Expression.Lambda>(id115361d62c18_expr_14, id115361d62c18_p_o_4); + var id115361d62c18_expr_0 = global::System.Linq.Expressions.Expression.Call(id115361d62c18_p_s, global::System.Linq.Enumerable.First(global::System.Linq.Enumerable.Where(typeof(global::TestNs.SetPropertyCalls).GetMethods(global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance), m => m.Name == "SetProperty" && m.IsGenericMethodDefinition && m.GetGenericArguments().Length == 1 && m.GetParameters().Length == 2 && m.GetParameters()[0].ParameterType.IsGenericType && !m.GetParameters()[0].ParameterType.IsGenericParameter && m.GetParameters()[1].ParameterType.IsGenericType && !m.GetParameters()[1].ParameterType.IsGenericParameter)).MakeGenericMethod(typeof(string)), new global::System.Linq.Expressions.Expression[] { id115361d62c18_expr_3, id115361d62c18_expr_15 }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(id115361d62c18_expr_0, id115361d62c18_p_s); return global::TestNs.MockRelationalExtensions.ExecuteUpdate( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GeneratedOutputCompilationTests.cs b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GeneratedOutputCompilationTests.cs new file mode 100644 index 00000000..e04c209f --- /dev/null +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GeneratedOutputCompilationTests.cs @@ -0,0 +1,108 @@ +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using ExpressiveSharp.Generator.Tests.Infrastructure; + +namespace ExpressiveSharp.Generator.Tests.PolyfillInterceptorGenerator; + +[TestClass] +public class GeneratedOutputCompilationTests : GeneratorTestBase +{ + private (GeneratorDriverRunResult Result, Compilation Output) RunInterceptorGenerator(Compilation compilation) + { + var subject = new global::ExpressiveSharp.Generator.PolyfillInterceptorGenerator(); + GeneratorDriver driver = CSharpGeneratorDriver + .Create(subject) + .WithUpdatedParseOptions((CSharpParseOptions)compilation.SyntaxTrees.First().Options); + + driver = driver.RunGeneratorsAndUpdateCompilation(compilation, out var outputCompilation, out _); + var result = driver.GetRunResult(); + + foreach (var tree in result.GeneratedTrees) + { + TestContext.WriteLine($"Generated: {tree.FilePath}"); + TestContext.WriteLine(tree.GetText().ToString()); + } + + return (result, outputCompilation); + } + + private static string FormatErrors(Compilation output) => + string.Join("\n", output.GetDiagnostics() + .Where(d => d.Severity == DiagnosticSeverity.Error) + .Select(d => d.ToString())); + + [TestMethod] + public void CollidingFileTags_SameCallPosition_InterceptorsCompile() + { + var (pathA, pathB) = FindCollidingPaths(); + TestContext.WriteLine($"Colliding paths: {pathA} / {pathB} (tag 0x{Fnv1a(pathA) & 0xFFFF:x4})"); + + const string sharedSource = + """ + namespace Shared { public class Order { public string Tag { get; set; } } } + """; + const string sourceTemplate = + """ + using ExpressiveSharp; + using Shared; + + namespace {0} + {{ + class TestClass + {{ + public void Run(System.Linq.IQueryable query) + {{ + query.AsExpressive().Where(o => o.Tag != null).ToList(); + }} + }} + }} + """; + + var compilation = CreateCompilation( + (sharedSource, "Shared.cs"), + (string.Format(sourceTemplate, "NsA"), pathA), + (string.Format(sourceTemplate, "NsB"), pathB)); + + var (result, output) = RunInterceptorGenerator(compilation); + + Assert.AreEqual(2, result.GeneratedTrees.Length, "Expected one interceptor file per source file."); + + var errors = output.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).ToList(); + Assert.AreEqual(0, errors.Count, + "Interceptors from files with colliding 16-bit path tags must not clash. Errors:\n" + + FormatErrors(output)); + } + + private static uint Fnv1a(string s) + { + unchecked + { + var hash = 2166136261u; + for (var i = 0; i < s.Length; i++) + { + hash ^= (uint)s[i]; + hash *= 16777619u; + } + return hash; + } + } + + private static (string PathA, string PathB) FindCollidingPaths() + { + var seen = new Dictionary(); + for (var i = 0; ; i++) + { + var path = $"File{i}.cs"; + var hash = Fnv1a(path); + var tag = hash & 0xFFFFu; + if (seen.TryGetValue(tag, out var other) && other.Hash != hash) + { + return (other.Path, path); + } + seen[tag] = (path, hash); + } + } +} diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Polyfill_GlobalNullConditionalIgnore_UsesIgnoreMode.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Polyfill_GlobalNullConditionalIgnore_UsesIgnoreMode.verified.txt index 491bd459..338fe70e 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Polyfill_GlobalNullConditionalIgnore_UsesIgnoreMode.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Polyfill_GlobalNullConditionalIgnore_UsesIgnoreMode.verified.txt @@ -6,19 +6,19 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_361d_9_68( + internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_d115361d_9_68( global::System.Func __func) { // Source: o => o.Tag?.Length - var i361d9c68_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c68_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c68_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var i361d9c68_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c68_expr_0, typeof(string).GetProperty("Length", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Length - var i361d9c68_expr_2 = global::System.Linq.Expressions.Expression.Convert(i361d9c68_expr_1, typeof(int?)); - var i361d9c68_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(string)); - var i361d9c68_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(i361d9c68_expr_0, i361d9c68_expr_4); - var i361d9c68_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(int?)); - var i361d9c68_expr_3 = global::System.Linq.Expressions.Expression.Condition(i361d9c68_expr_5, i361d9c68_expr_2, i361d9c68_expr_6, typeof(int?)); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c68_expr_3, i361d9c68_p_o); + var id115361d9c68_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c68_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c68_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var id115361d9c68_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c68_expr_0, typeof(string).GetProperty("Length", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Length + var id115361d9c68_expr_2 = global::System.Linq.Expressions.Expression.Convert(id115361d9c68_expr_1, typeof(int?)); + var id115361d9c68_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(string)); + var id115361d9c68_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(id115361d9c68_expr_0, id115361d9c68_expr_4); + var id115361d9c68_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(int?)); + var id115361d9c68_expr_3 = global::System.Linq.Expressions.Expression.Condition(id115361d9c68_expr_5, id115361d9c68_expr_2, id115361d9c68_expr_6, typeof(int?)); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c68_expr_3, id115361d9c68_p_o); return __lambda; } } diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Where_GlobalNullConditionalRewrite_AppliesWithoutPerCallOverride.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Where_GlobalNullConditionalRewrite_AppliesWithoutPerCallOverride.verified.txt index 28857ced..59778e5c 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Where_GlobalNullConditionalRewrite_AppliesWithoutPerCallOverride.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Where_GlobalNullConditionalRewrite_AppliesWithoutPerCallOverride.verified.txt @@ -6,21 +6,21 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_11_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_d115361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Customer?.Name == "Alice" - var i361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c18_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Customer", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Customer - var i361d11c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d11c18_expr_1, typeof(global::TestNs.Customer).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Name - var i361d11c18_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); - var i361d11c18_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(i361d11c18_expr_1, i361d11c18_expr_4); - var i361d11c18_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(string)); - var i361d11c18_expr_3 = global::System.Linq.Expressions.Expression.Condition(i361d11c18_expr_5, i361d11c18_expr_2, i361d11c18_expr_6, typeof(string)); - var i361d11c18_expr_7 = global::System.Linq.Expressions.Expression.Constant("Alice", typeof(string)); // "Alice" - var i361d11c18_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i361d11c18_expr_3, i361d11c18_expr_7); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_o); + var id115361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c18_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Customer", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Customer + var id115361d11c18_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_expr_1, typeof(global::TestNs.Customer).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Name + var id115361d11c18_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); + var id115361d11c18_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(id115361d11c18_expr_1, id115361d11c18_expr_4); + var id115361d11c18_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(string)); + var id115361d11c18_expr_3 = global::System.Linq.Expressions.Expression.Condition(id115361d11c18_expr_5, id115361d11c18_expr_2, id115361d11c18_expr_6, typeof(string)); + var id115361d11c18_expr_7 = global::System.Linq.Expressions.Expression.Constant("Alice", typeof(string)); // "Alice" + var id115361d11c18_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, id115361d11c18_expr_3, id115361d11c18_expr_7); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c18_expr_0, id115361d11c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Where( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Where_PerCallOverridesGlobal.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Where_PerCallOverridesGlobal.verified.txt index 28857ced..59778e5c 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Where_PerCallOverridesGlobal.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Where_PerCallOverridesGlobal.verified.txt @@ -6,21 +6,21 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_11_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_d115361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Customer?.Name == "Alice" - var i361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c18_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Customer", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Customer - var i361d11c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d11c18_expr_1, typeof(global::TestNs.Customer).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Name - var i361d11c18_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); - var i361d11c18_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(i361d11c18_expr_1, i361d11c18_expr_4); - var i361d11c18_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(string)); - var i361d11c18_expr_3 = global::System.Linq.Expressions.Expression.Condition(i361d11c18_expr_5, i361d11c18_expr_2, i361d11c18_expr_6, typeof(string)); - var i361d11c18_expr_7 = global::System.Linq.Expressions.Expression.Constant("Alice", typeof(string)); // "Alice" - var i361d11c18_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i361d11c18_expr_3, i361d11c18_expr_7); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_o); + var id115361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c18_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Customer", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Customer + var id115361d11c18_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_expr_1, typeof(global::TestNs.Customer).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Name + var id115361d11c18_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); + var id115361d11c18_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(id115361d11c18_expr_1, id115361d11c18_expr_4); + var id115361d11c18_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(string)); + var id115361d11c18_expr_3 = global::System.Linq.Expressions.Expression.Condition(id115361d11c18_expr_5, id115361d11c18_expr_2, id115361d11c18_expr_6, typeof(string)); + var id115361d11c18_expr_7 = global::System.Linq.Expressions.Expression.Constant("Alice", typeof(string)); // "Alice" + var id115361d11c18_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, id115361d11c18_expr_3, id115361d11c18_expr_7); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c18_expr_0, id115361d11c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Where( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_GeneratesGroupingReturnType.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_GeneratesGroupingReturnType.verified.txt index 8436bced..43588c62 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_GeneratesGroupingReturnType.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_GeneratesGroupingReturnType.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.GroupBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithElementAndResultSelector_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithElementAndResultSelector_GeneratesInterceptor.verified.txt index d5e6c2b6..b9453f1a 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithElementAndResultSelector_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithElementAndResultSelector_GeneratesInterceptor.verified.txt @@ -6,24 +6,24 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func1, global::System.Func __func2, global::System.Func, string> __func3) { // Source: o => o.Tag - var i361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18a_expr_0, i361d10c18a_p_o); + var id115361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18a_expr_0, id115361d10c18a_p_o); // Source: o => o.Name - var i361d10c18b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18b_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18b_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18b_expr_0, i361d10c18b_p_o); + var id115361d10c18b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18b_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18b_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18b_expr_0, id115361d10c18b_p_o); // Source: (key, names) => key - var i361d10c18c_p_key = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "key"); - var i361d10c18c_p_names = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "names"); - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda, string>>(i361d10c18c_p_key, i361d10c18c_p_key, i361d10c18c_p_names); + var id115361d10c18c_p_key = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "key"); + var id115361d10c18c_p_names = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "names"); + var __lambda3 = global::System.Linq.Expressions.Expression.Lambda, string>>(id115361d10c18c_p_key, id115361d10c18c_p_key, id115361d10c18c_p_names); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.GroupBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithElementSelector_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithElementSelector_GeneratesInterceptor.verified.txt index aae8bd3f..de8421f6 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithElementSelector_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithElementSelector_GeneratesInterceptor.verified.txt @@ -6,19 +6,19 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func1, global::System.Func __func2) { // Source: o => o.Tag - var i361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18a_expr_0, i361d10c18a_p_o); + var id115361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18a_expr_0, id115361d10c18a_p_o); // Source: o => o.Name - var i361d10c18b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18b_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18b_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18b_expr_0, i361d10c18b_p_o); + var id115361d10c18b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18b_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18b_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18b_expr_0, id115361d10c18b_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.GroupBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithResultSelector_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithResultSelector_GeneratesInterceptor.verified.txt index a394fa4c..c1d2adcc 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithResultSelector_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_WithResultSelector_GeneratesInterceptor.verified.txt @@ -6,19 +6,19 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func1, global::System.Func, string> __func2) { // Source: o => o.Tag - var i361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18a_expr_0, i361d10c18a_p_o); + var id115361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18a_expr_0, id115361d10c18a_p_o); // Source: (key, orders) => key - var i361d10c18b_p_key = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "key"); - var i361d10c18b_p_orders = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "orders"); - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda, string>>(i361d10c18b_p_key, i361d10c18b_p_key, i361d10c18b_p_orders); + var id115361d10c18b_p_key = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "key"); + var id115361d10c18b_p_orders = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "orders"); + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda, string>>(id115361d10c18b_p_key, id115361d10c18b_p_key, id115361d10c18b_p_orders); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.GroupBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.GroupJoin_AnonymousResultSelector_GeneratesGenericInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.GroupJoin_AnonymousResultSelector_GeneratesGenericInterceptor.verified.txt index 02adaf02..0c6d6a92 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.GroupJoin_AnonymousResultSelector_GeneratesGenericInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.GroupJoin_AnonymousResultSelector_GeneratesGenericInterceptor.verified.txt @@ -6,7 +6,7 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupJoin_361d_11_19( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupJoin_d115361d_11_19( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable inner, global::System.Func __func1, @@ -14,21 +14,21 @@ namespace ExpressiveSharp.Generated.Interceptors global::System.Func, T3> __func3) { // Source: o => o.CustomerId - var i361d11c19a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d11c19a_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c19a_p_o, typeof(T0).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19a_expr_0, i361d11c19a_p_o); + var id115361d11c19a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d11c19a_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c19a_p_o, typeof(T0).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c19a_expr_0, id115361d11c19a_p_o); // Source: c => c.Id - var i361d11c19b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(T1), "c"); - var i361d11c19b_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c19b_p_c, typeof(T1).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Id - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19b_expr_0, i361d11c19b_p_c); + var id115361d11c19b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(T1), "c"); + var id115361d11c19b_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c19b_p_c, typeof(T1).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Id + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c19b_expr_0, id115361d11c19b_p_c); // Source: (o, cs) => new { o.CustomerId, Count = cs.Count() } - var i361d11c19c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d11c19c_p_cs = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "cs"); - var i361d11c19c_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d11c19c_p_o, typeof(T0).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId - var i361d11c19c_expr_2 = global::System.Linq.Expressions.Expression.Call(global::System.Linq.Enumerable.First(global::System.Linq.Enumerable.Where(typeof(global::System.Linq.Enumerable).GetMethods(global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static), m => m.Name == "Count" && m.IsGenericMethodDefinition && m.GetGenericArguments().Length == 1 && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.IsGenericType && !m.GetParameters()[0].ParameterType.IsGenericParameter)).MakeGenericMethod(typeof(T1)), new global::System.Linq.Expressions.Expression[] { i361d11c19c_p_cs }); // cs.Count() - var i361d11c19c_expr_3 = typeof(T3).GetConstructors()[0]; - var i361d11c19c_expr_0 = global::System.Linq.Expressions.Expression.New(i361d11c19c_expr_3, new global::System.Linq.Expressions.Expression[] { i361d11c19c_expr_1, i361d11c19c_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T3).GetProperty("CustomerId"), typeof(T3).GetProperty("Count") }); - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda, T3>>(i361d11c19c_expr_0, i361d11c19c_p_o, i361d11c19c_p_cs); + var id115361d11c19c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d11c19c_p_cs = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "cs"); + var id115361d11c19c_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d11c19c_p_o, typeof(T0).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId + var id115361d11c19c_expr_2 = global::System.Linq.Expressions.Expression.Call(global::System.Linq.Enumerable.First(global::System.Linq.Enumerable.Where(typeof(global::System.Linq.Enumerable).GetMethods(global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static), m => m.Name == "Count" && m.IsGenericMethodDefinition && m.GetGenericArguments().Length == 1 && m.GetParameters().Length == 1 && m.GetParameters()[0].ParameterType.IsGenericType && !m.GetParameters()[0].ParameterType.IsGenericParameter)).MakeGenericMethod(typeof(T1)), new global::System.Linq.Expressions.Expression[] { id115361d11c19c_p_cs }); // cs.Count() + var id115361d11c19c_expr_3 = typeof(T3).GetConstructors()[0]; + var id115361d11c19c_expr_0 = global::System.Linq.Expressions.Expression.New(id115361d11c19c_expr_3, new global::System.Linq.Expressions.Expression[] { id115361d11c19c_expr_1, id115361d11c19c_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T3).GetProperty("CustomerId"), typeof(T3).GetProperty("Count") }); + var __lambda3 = global::System.Linq.Expressions.Expression.Lambda, T3>>(id115361d11c19c_expr_0, id115361d11c19c_p_o, id115361d11c19c_p_cs); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.GroupJoin( diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.GroupJoin_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.GroupJoin_GeneratesInterceptor.verified.txt index b84f8bca..f145f967 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.GroupJoin_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.GroupJoin_GeneratesInterceptor.verified.txt @@ -6,7 +6,7 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupJoin_361d_11_19( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupJoin_d115361d_11_19( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable inner, global::System.Func __func1, @@ -14,18 +14,18 @@ namespace ExpressiveSharp.Generated.Interceptors global::System.Func, int> __func3) { // Source: o => o.CustomerId - var i361d11c19a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c19a_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c19a_p_o, typeof(global::TestNs.Order).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19a_expr_0, i361d11c19a_p_o); + var id115361d11c19a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c19a_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c19a_p_o, typeof(global::TestNs.Order).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c19a_expr_0, id115361d11c19a_p_o); // Source: c => c.Id - var i361d11c19b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Customer), "c"); - var i361d11c19b_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c19b_p_c, typeof(global::TestNs.Customer).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Id - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19b_expr_0, i361d11c19b_p_c); + var id115361d11c19b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Customer), "c"); + var id115361d11c19b_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c19b_p_c, typeof(global::TestNs.Customer).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Id + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c19b_expr_0, id115361d11c19b_p_c); // Source: (o, cs) => o.CustomerId - var i361d11c19c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c19c_p_cs = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "cs"); - var i361d11c19c_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c19c_p_o, typeof(global::TestNs.Order).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda, int>>(i361d11c19c_expr_0, i361d11c19c_p_o, i361d11c19c_p_cs); + var id115361d11c19c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c19c_p_cs = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "cs"); + var id115361d11c19c_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c19c_p_o, typeof(global::TestNs.Order).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId + var __lambda3 = global::System.Linq.Expressions.Expression.Lambda, int>>(id115361d11c19c_expr_0, id115361d11c19c_p_o, id115361d11c19c_p_cs); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.GroupJoin( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.Join_AnonymousResultSelector_GeneratesGenericInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.Join_AnonymousResultSelector_GeneratesGenericInterceptor.verified.txt index 406e5aad..59ce91cc 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.Join_AnonymousResultSelector_GeneratesGenericInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.Join_AnonymousResultSelector_GeneratesGenericInterceptor.verified.txt @@ -6,7 +6,7 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Join_361d_11_19( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Join_d115361d_11_19( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable inner, global::System.Func __func1, @@ -14,21 +14,21 @@ namespace ExpressiveSharp.Generated.Interceptors global::System.Func __func3) { // Source: o => o.CustomerId - var i361d11c19a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d11c19a_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c19a_p_o, typeof(T0).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19a_expr_0, i361d11c19a_p_o); + var id115361d11c19a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d11c19a_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c19a_p_o, typeof(T0).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c19a_expr_0, id115361d11c19a_p_o); // Source: c => c.Id - var i361d11c19b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(T1), "c"); - var i361d11c19b_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c19b_p_c, typeof(T1).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Id - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19b_expr_0, i361d11c19b_p_c); + var id115361d11c19b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(T1), "c"); + var id115361d11c19b_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c19b_p_c, typeof(T1).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Id + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c19b_expr_0, id115361d11c19b_p_c); // Source: (o, c) => new { o.Product, CustomerName = c.Name } - var i361d11c19c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d11c19c_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(T1), "c"); - var i361d11c19c_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d11c19c_p_o, typeof(T0).GetProperty("Product", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Product - var i361d11c19c_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d11c19c_p_c, typeof(T1).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Name - var i361d11c19c_expr_3 = typeof(T3).GetConstructors()[0]; - var i361d11c19c_expr_0 = global::System.Linq.Expressions.Expression.New(i361d11c19c_expr_3, new global::System.Linq.Expressions.Expression[] { i361d11c19c_expr_1, i361d11c19c_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T3).GetProperty("Product"), typeof(T3).GetProperty("CustomerName") }); - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19c_expr_0, i361d11c19c_p_o, i361d11c19c_p_c); + var id115361d11c19c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d11c19c_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(T1), "c"); + var id115361d11c19c_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d11c19c_p_o, typeof(T0).GetProperty("Product", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Product + var id115361d11c19c_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d11c19c_p_c, typeof(T1).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Name + var id115361d11c19c_expr_3 = typeof(T3).GetConstructors()[0]; + var id115361d11c19c_expr_0 = global::System.Linq.Expressions.Expression.New(id115361d11c19c_expr_3, new global::System.Linq.Expressions.Expression[] { id115361d11c19c_expr_1, id115361d11c19c_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T3).GetProperty("Product"), typeof(T3).GetProperty("CustomerName") }); + var __lambda3 = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c19c_expr_0, id115361d11c19c_p_o, id115361d11c19c_p_c); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Join( diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.Join_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.Join_GeneratesInterceptor.verified.txt index 2b3ad5ca..9e3673b9 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.Join_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.Join_GeneratesInterceptor.verified.txt @@ -6,7 +6,7 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Join_361d_11_19( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Join_d115361d_11_19( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable inner, global::System.Func __func1, @@ -14,22 +14,22 @@ namespace ExpressiveSharp.Generated.Interceptors global::System.Func __func3) { // Source: o => o.CustomerId - var i361d11c19a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c19a_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c19a_p_o, typeof(global::TestNs.Order).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19a_expr_0, i361d11c19a_p_o); + var id115361d11c19a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c19a_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c19a_p_o, typeof(global::TestNs.Order).GetProperty("CustomerId", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.CustomerId + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c19a_expr_0, id115361d11c19a_p_o); // Source: c => c.Id - var i361d11c19b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Customer), "c"); - var i361d11c19b_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c19b_p_c, typeof(global::TestNs.Customer).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Id - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19b_expr_0, i361d11c19b_p_c); + var id115361d11c19b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Customer), "c"); + var id115361d11c19b_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c19b_p_c, typeof(global::TestNs.Customer).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Id + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c19b_expr_0, id115361d11c19b_p_c); // Source: (o, c) => o.Product + " - " + c.Name - var i361d11c19c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c19c_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Customer), "c"); - var i361d11c19c_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d11c19c_p_o, typeof(global::TestNs.Order).GetProperty("Product", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Product - var i361d11c19c_expr_3 = global::System.Linq.Expressions.Expression.Constant(" - ", typeof(string)); // " - " - var i361d11c19c_expr_1 = global::System.Linq.Expressions.Expression.Call(typeof(string).GetMethod("Concat", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(string), typeof(string) }, null), i361d11c19c_expr_2, i361d11c19c_expr_3); - var i361d11c19c_expr_4 = global::System.Linq.Expressions.Expression.Property(i361d11c19c_p_c, typeof(global::TestNs.Customer).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Name - var i361d11c19c_expr_0 = global::System.Linq.Expressions.Expression.Call(typeof(string).GetMethod("Concat", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(string), typeof(string) }, null), i361d11c19c_expr_1, i361d11c19c_expr_4); - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19c_expr_0, i361d11c19c_p_o, i361d11c19c_p_c); + var id115361d11c19c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c19c_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Customer), "c"); + var id115361d11c19c_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d11c19c_p_o, typeof(global::TestNs.Order).GetProperty("Product", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Product + var id115361d11c19c_expr_3 = global::System.Linq.Expressions.Expression.Constant(" - ", typeof(string)); // " - " + var id115361d11c19c_expr_1 = global::System.Linq.Expressions.Expression.Call(typeof(string).GetMethod("Concat", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(string), typeof(string) }, null), id115361d11c19c_expr_2, id115361d11c19c_expr_3); + var id115361d11c19c_expr_4 = global::System.Linq.Expressions.Expression.Property(id115361d11c19c_p_c, typeof(global::TestNs.Customer).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // c.Name + var id115361d11c19c_expr_0 = global::System.Linq.Expressions.Expression.Call(typeof(string).GetMethod("Concat", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(string), typeof(string) }, null), id115361d11c19c_expr_1, id115361d11c19c_expr_4); + var __lambda3 = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c19c_expr_0, id115361d11c19c_p_o, id115361d11c19c_p_c); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Join( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/NullConditionalTests.NullConditionalRewrite_ExpandsInWhereBody.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/NullConditionalTests.NullConditionalRewrite_ExpandsInWhereBody.verified.txt index 28857ced..59778e5c 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/NullConditionalTests.NullConditionalRewrite_ExpandsInWhereBody.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/NullConditionalTests.NullConditionalRewrite_ExpandsInWhereBody.verified.txt @@ -6,21 +6,21 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_11_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_d115361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Customer?.Name == "Alice" - var i361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c18_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Customer", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Customer - var i361d11c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d11c18_expr_1, typeof(global::TestNs.Customer).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Name - var i361d11c18_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); - var i361d11c18_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(i361d11c18_expr_1, i361d11c18_expr_4); - var i361d11c18_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(string)); - var i361d11c18_expr_3 = global::System.Linq.Expressions.Expression.Condition(i361d11c18_expr_5, i361d11c18_expr_2, i361d11c18_expr_6, typeof(string)); - var i361d11c18_expr_7 = global::System.Linq.Expressions.Expression.Constant("Alice", typeof(string)); // "Alice" - var i361d11c18_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i361d11c18_expr_3, i361d11c18_expr_7); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_o); + var id115361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c18_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Customer", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Customer + var id115361d11c18_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_expr_1, typeof(global::TestNs.Customer).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Name + var id115361d11c18_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); + var id115361d11c18_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(id115361d11c18_expr_1, id115361d11c18_expr_4); + var id115361d11c18_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(string)); + var id115361d11c18_expr_3 = global::System.Linq.Expressions.Expression.Condition(id115361d11c18_expr_5, id115361d11c18_expr_2, id115361d11c18_expr_6, typeof(string)); + var id115361d11c18_expr_7 = global::System.Linq.Expressions.Expression.Constant("Alice", typeof(string)); // "Alice" + var id115361d11c18_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, id115361d11c18_expr_3, id115361d11c18_expr_7); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c18_expr_0, id115361d11c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Where( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.OrderBy_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.OrderBy_GeneratesInterceptor.verified.txt index 05034777..5b2da449 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.OrderBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.OrderBy_GeneratesInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Priority - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Priority", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Priority - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Priority", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Priority + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.OrderBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.ThenBy_CastsToIOrderedQueryable.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.ThenBy_CastsToIOrderedQueryable.verified.txt index fd5dca7a..5badf806 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.ThenBy_CastsToIOrderedQueryable.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.ThenBy_CastsToIOrderedQueryable.verified.txt @@ -6,28 +6,28 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ThenBy_361d_11_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ThenBy_d115361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Name - var i361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_o); + var id115361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c18_expr_0, id115361d11c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.ThenBy( (global::System.Linq.IOrderedQueryable)source, __lambda)); } [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Priority - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Priority", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Priority - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Priority", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Priority + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.OrderBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTargetTests.PolyfillTarget_RoutesToSpecifiedType.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTargetTests.PolyfillTarget_RoutesToSpecifiedType.verified.txt index 54466e12..852b4ebb 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTargetTests.PolyfillTarget_RoutesToSpecifiedType.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTargetTests.PolyfillTarget_RoutesToSpecifiedType.verified.txt @@ -6,15 +6,15 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Threading.Tasks.Task __Polyfill_AnyAsync_361d_33_46( + internal static global::System.Threading.Tasks.Task __Polyfill_AnyAsync_d115361d_33_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func, global::System.Threading.CancellationToken cancellationToken) { // Source: o => o.Active - var i361d33c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d33c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d33c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d33c46_expr_0, i361d33c46_p_o); + var id115361d33c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d33c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d33c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d33c46_expr_0, id115361d33c46_p_o); return global::TestNs.MockEfExtensions.AnyAsync( (global::System.Linq.IQueryable)source, __lambda, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTargetTests.PolyfillTarget_WithoutAttribute_DefaultsToQueryable.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTargetTests.PolyfillTarget_WithoutAttribute_DefaultsToQueryable.verified.txt index 1258918c..37dce5bd 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTargetTests.PolyfillTarget_WithoutAttribute_DefaultsToQueryable.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTargetTests.PolyfillTarget_WithoutAttribute_DefaultsToQueryable.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static bool __Polyfill_Any_361d_9_46( + internal static bool __Polyfill_Any_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Any( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_CapturedVariable_GeneratesClosureAccess.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_CapturedVariable_GeneratesClosureAccess.verified.txt index 3f1f3c7b..a4f5bfd9 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_CapturedVariable_GeneratesClosureAccess.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_CapturedVariable_GeneratesClosureAccess.verified.txt @@ -6,15 +6,15 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_361d_9_42( + internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_d115361d_9_42( global::System.Func __func) { // Source: (Order o) => o.Price > threshold - var i361d9c42_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c42_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c42_p_o, typeof(global::TestNs.Order).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price - var i361d9c42_expr_2 = global::System.Linq.Expressions.Expression.MakeMemberAccess(global::System.Linq.Expressions.Expression.Constant(__func.Target), __func.Target.GetType().GetField("threshold", global::System.Reflection.BindingFlags.Instance | global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic)); // threshold - var i361d9c42_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i361d9c42_expr_1, i361d9c42_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c42_expr_0, i361d9c42_p_o); + var id115361d9c42_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c42_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c42_p_o, typeof(global::TestNs.Order).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price + var id115361d9c42_expr_2 = global::System.Linq.Expressions.Expression.MakeMemberAccess(global::System.Linq.Expressions.Expression.Constant(__func.Target), __func.Target.GetType().GetField("threshold", global::System.Reflection.BindingFlags.Instance | global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic)); // threshold + var id115361d9c42_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, id115361d9c42_expr_1, id115361d9c42_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c42_expr_0, id115361d9c42_p_o); return __lambda; } } diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_InferredTypeArgument_GeneratesExpression.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_InferredTypeArgument_GeneratesExpression.verified.txt index d0b728f5..41fb2e17 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_InferredTypeArgument_GeneratesExpression.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_InferredTypeArgument_GeneratesExpression.verified.txt @@ -6,15 +6,15 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_361d_9_42( + internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_d115361d_9_42( global::System.Func __func) { // Source: (Order o) => o.Tag == "urgent" - var i361d9c42_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c42_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c42_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var i361d9c42_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" - var i361d9c42_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i361d9c42_expr_1, i361d9c42_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c42_expr_0, i361d9c42_p_o); + var id115361d9c42_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c42_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c42_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var id115361d9c42_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" + var id115361d9c42_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, id115361d9c42_expr_1, id115361d9c42_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c42_expr_0, id115361d9c42_p_o); return __lambda; } } diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_NullConditional_RewritesOperator.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_NullConditional_RewritesOperator.verified.txt index 491bd459..338fe70e 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_NullConditional_RewritesOperator.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_NullConditional_RewritesOperator.verified.txt @@ -6,19 +6,19 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_361d_9_68( + internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_d115361d_9_68( global::System.Func __func) { // Source: o => o.Tag?.Length - var i361d9c68_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c68_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c68_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var i361d9c68_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c68_expr_0, typeof(string).GetProperty("Length", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Length - var i361d9c68_expr_2 = global::System.Linq.Expressions.Expression.Convert(i361d9c68_expr_1, typeof(int?)); - var i361d9c68_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(string)); - var i361d9c68_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(i361d9c68_expr_0, i361d9c68_expr_4); - var i361d9c68_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(int?)); - var i361d9c68_expr_3 = global::System.Linq.Expressions.Expression.Condition(i361d9c68_expr_5, i361d9c68_expr_2, i361d9c68_expr_6, typeof(int?)); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c68_expr_3, i361d9c68_p_o); + var id115361d9c68_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c68_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c68_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var id115361d9c68_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c68_expr_0, typeof(string).GetProperty("Length", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // .Length + var id115361d9c68_expr_2 = global::System.Linq.Expressions.Expression.Convert(id115361d9c68_expr_1, typeof(int?)); + var id115361d9c68_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(string)); + var id115361d9c68_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(id115361d9c68_expr_0, id115361d9c68_expr_4); + var id115361d9c68_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(int?)); + var id115361d9c68_expr_3 = global::System.Linq.Expressions.Expression.Condition(id115361d9c68_expr_5, id115361d9c68_expr_2, id115361d9c68_expr_6, typeof(int?)); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c68_expr_3, id115361d9c68_p_o); return __lambda; } } diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_SimpleLambda_GeneratesExpression.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_SimpleLambda_GeneratesExpression.verified.txt index f4271a15..45d83b2f 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_SimpleLambda_GeneratesExpression.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTests.Polyfill_SimpleLambda_GeneratesExpression.verified.txt @@ -6,15 +6,15 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_361d_9_68( + internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_d115361d_9_68( global::System.Func __func) { // Source: o => o.Tag == "urgent" - var i361d9c68_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c68_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c68_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var i361d9c68_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" - var i361d9c68_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i361d9c68_expr_1, i361d9c68_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c68_expr_0, i361d9c68_p_o); + var id115361d9c68_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c68_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c68_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var id115361d9c68_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" + var id115361d9c68_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, id115361d9c68_expr_1, id115361d9c68_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c68_expr_0, id115361d9c68_p_o); return __lambda; } } diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.All_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.All_GeneratesScalarInterceptor.verified.txt index 23dfd0d3..a82b3123 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.All_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.All_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static bool __Polyfill_All_361d_9_46( + internal static bool __Polyfill_All_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.All( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Any_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Any_GeneratesScalarInterceptor.verified.txt index dd700c20..acbbe7e8 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Any_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Any_GeneratesScalarInterceptor.verified.txt @@ -6,16 +6,16 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static bool __Polyfill_Any_361d_9_46( + internal static bool __Polyfill_Any_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag == "urgent" - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var i361d9c46_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i361d9c46_expr_1, i361d9c46_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var id115361d9c46_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, id115361d9c46_expr_1, id115361d9c46_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Any( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_DecimalSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_DecimalSelector_GeneratesScalarInterceptor.verified.txt index 58c98973..9d8896ea 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_DecimalSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_DecimalSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static decimal __Polyfill_Average_361d_9_46( + internal static decimal __Polyfill_Average_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Average( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_DoubleSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_DoubleSelector_GeneratesScalarInterceptor.verified.txt index 38df5ff5..6239cc9b 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_DoubleSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_DoubleSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double __Polyfill_Average_361d_9_46( + internal static double __Polyfill_Average_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Average( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_FloatSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_FloatSelector_GeneratesScalarInterceptor.verified.txt index a1d3d29b..34d030f6 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_FloatSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_FloatSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static float __Polyfill_Average_361d_9_46( + internal static float __Polyfill_Average_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Average( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_IntSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_IntSelector_GeneratesScalarInterceptor.verified.txt index 121edd26..e83daaa6 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_IntSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_IntSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double __Polyfill_Average_361d_9_46( + internal static double __Polyfill_Average_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Average( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_LongSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_LongSelector_GeneratesScalarInterceptor.verified.txt index 0dc786a5..d97ae276 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_LongSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_LongSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double __Polyfill_Average_361d_9_46( + internal static double __Polyfill_Average_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Average( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableDecimalSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableDecimalSelector_GeneratesScalarInterceptor.verified.txt index 4845e179..64be2cf5 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableDecimalSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableDecimalSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static decimal? __Polyfill_Average_361d_9_46( + internal static decimal? __Polyfill_Average_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Average( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableDoubleSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableDoubleSelector_GeneratesScalarInterceptor.verified.txt index 3d1c632b..0e6810d0 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableDoubleSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableDoubleSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double? __Polyfill_Average_361d_9_46( + internal static double? __Polyfill_Average_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Average( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableFloatSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableFloatSelector_GeneratesScalarInterceptor.verified.txt index 0201abb9..bdbf07a8 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableFloatSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableFloatSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static float? __Polyfill_Average_361d_9_46( + internal static float? __Polyfill_Average_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Average( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableIntSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableIntSelector_GeneratesScalarInterceptor.verified.txt index 56c68052..9adeb036 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableIntSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableIntSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double? __Polyfill_Average_361d_9_46( + internal static double? __Polyfill_Average_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Average( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableLongSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableLongSelector_GeneratesScalarInterceptor.verified.txt index 4c7bbb70..f98b5f3a 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableLongSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Average_NullableLongSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double? __Polyfill_Average_361d_9_46( + internal static double? __Polyfill_Average_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Average( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Count_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Count_GeneratesScalarInterceptor.verified.txt index 81b18dc2..147d5b26 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Count_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Count_GeneratesScalarInterceptor.verified.txt @@ -6,16 +6,16 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_Count_361d_9_46( + internal static int __Polyfill_Count_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount > 100 - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var i361d9c46_expr_2 = global::System.Linq.Expressions.Expression.Constant(100, typeof(int)); // 100 - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i361d9c46_expr_1, i361d9c46_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var id115361d9c46_expr_2 = global::System.Linq.Expressions.Expression.Constant(100, typeof(int)); // 100 + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, id115361d9c46_expr_1, id115361d9c46_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Count( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.FirstOrDefault_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.FirstOrDefault_GeneratesScalarInterceptor.verified.txt index 90144600..e277ec24 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.FirstOrDefault_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.FirstOrDefault_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_FirstOrDefault_361d_9_46( + internal static global::TestNs.Order __Polyfill_FirstOrDefault_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.FirstOrDefault( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.First_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.First_GeneratesScalarInterceptor.verified.txt index 84c133b1..660715e9 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.First_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.First_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_First_361d_9_46( + internal static global::TestNs.Order __Polyfill_First_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.First( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LastOrDefault_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LastOrDefault_GeneratesScalarInterceptor.verified.txt index 39b16329..8561c507 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LastOrDefault_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LastOrDefault_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_LastOrDefault_361d_9_46( + internal static global::TestNs.Order __Polyfill_LastOrDefault_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.LastOrDefault( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Last_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Last_GeneratesScalarInterceptor.verified.txt index d7e3000f..be9d886f 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Last_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Last_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_Last_361d_9_46( + internal static global::TestNs.Order __Polyfill_Last_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Last( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LongCount_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LongCount_GeneratesScalarInterceptor.verified.txt index 4af31f7d..945fff88 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LongCount_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LongCount_GeneratesScalarInterceptor.verified.txt @@ -6,16 +6,16 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static long __Polyfill_LongCount_361d_9_46( + internal static long __Polyfill_LongCount_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount > 100 - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var i361d9c46_expr_2 = global::System.Linq.Expressions.Expression.Constant(100, typeof(int)); // 100 - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i361d9c46_expr_1, i361d9c46_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var id115361d9c46_expr_2 = global::System.Linq.Expressions.Expression.Constant(100, typeof(int)); // 100 + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, id115361d9c46_expr_1, id115361d9c46_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.LongCount( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MaxBy_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MaxBy_GeneratesScalarInterceptor.verified.txt index 94bb29cd..3382d052 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MaxBy_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MaxBy_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_MaxBy_361d_9_46( + internal static global::TestNs.Order __Polyfill_MaxBy_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.MaxBy( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Max_GenericSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Max_GenericSelector_GeneratesScalarInterceptor.verified.txt index a3ec8ec0..960eb1ce 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Max_GenericSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Max_GenericSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static string __Polyfill_Max_361d_9_46( + internal static string __Polyfill_Max_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Name - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Max( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MinBy_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MinBy_GeneratesScalarInterceptor.verified.txt index 114f3706..378edd32 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MinBy_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MinBy_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_MinBy_361d_9_46( + internal static global::TestNs.Order __Polyfill_MinBy_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.MinBy( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Min_GenericSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Min_GenericSelector_GeneratesScalarInterceptor.verified.txt index b6972b38..8aaa8748 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Min_GenericSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Min_GenericSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static string __Polyfill_Min_361d_9_46( + internal static string __Polyfill_Min_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Name - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Min( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.SingleOrDefault_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.SingleOrDefault_GeneratesScalarInterceptor.verified.txt index 2b95abd1..11515b46 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.SingleOrDefault_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.SingleOrDefault_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_SingleOrDefault_361d_9_46( + internal static global::TestNs.Order __Polyfill_SingleOrDefault_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.SingleOrDefault( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Single_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Single_GeneratesScalarInterceptor.verified.txt index 9e611c51..1f4f30da 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Single_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Single_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_Single_361d_9_46( + internal static global::TestNs.Order __Polyfill_Single_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Single( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_DecimalSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_DecimalSelector_GeneratesScalarInterceptor.verified.txt index 16de6902..bc4ad9fd 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_DecimalSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_DecimalSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static decimal __Polyfill_Sum_361d_9_46( + internal static decimal __Polyfill_Sum_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Sum( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_DoubleSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_DoubleSelector_GeneratesScalarInterceptor.verified.txt index ac89eaa2..3cedec82 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_DoubleSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_DoubleSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double __Polyfill_Sum_361d_9_46( + internal static double __Polyfill_Sum_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Sum( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_FloatSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_FloatSelector_GeneratesScalarInterceptor.verified.txt index 29fcc6cd..c6005ca5 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_FloatSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_FloatSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static float __Polyfill_Sum_361d_9_46( + internal static float __Polyfill_Sum_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Sum( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_IntSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_IntSelector_GeneratesScalarInterceptor.verified.txt index e8ed2bf9..759edd66 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_IntSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_IntSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_Sum_361d_9_46( + internal static int __Polyfill_Sum_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Sum( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_LongSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_LongSelector_GeneratesScalarInterceptor.verified.txt index 0e23d68c..09afbb03 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_LongSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_LongSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static long __Polyfill_Sum_361d_9_46( + internal static long __Polyfill_Sum_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Sum( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableDecimalSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableDecimalSelector_GeneratesScalarInterceptor.verified.txt index a5016a5b..53528b3f 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableDecimalSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableDecimalSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static decimal? __Polyfill_Sum_361d_9_46( + internal static decimal? __Polyfill_Sum_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Sum( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableDoubleSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableDoubleSelector_GeneratesScalarInterceptor.verified.txt index eca286ba..41f4ff89 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableDoubleSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableDoubleSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double? __Polyfill_Sum_361d_9_46( + internal static double? __Polyfill_Sum_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Sum( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableFloatSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableFloatSelector_GeneratesScalarInterceptor.verified.txt index 73075237..839051c7 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableFloatSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableFloatSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static float? __Polyfill_Sum_361d_9_46( + internal static float? __Polyfill_Sum_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Sum( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableIntSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableIntSelector_GeneratesScalarInterceptor.verified.txt index c44baad4..1ea463ad 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableIntSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableIntSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int? __Polyfill_Sum_361d_9_46( + internal static int? __Polyfill_Sum_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Sum( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableLongSelector_GeneratesScalarInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableLongSelector_GeneratesScalarInterceptor.verified.txt index 8fd6a579..b63dd78e 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableLongSelector_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Sum_NullableLongSelector_GeneratesScalarInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static long? __Polyfill_Sum_361d_9_46( + internal static long? __Polyfill_Sum_d115361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_p_o); + var id115361d9c46_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c46_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c46_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c46_expr_0, id115361d9c46_p_o); return global::System.Linq.Queryable.Sum( (global::System.Linq.IQueryable)source, __lambda); diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectManyTests.SelectMany_CollectionSelector_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectManyTests.SelectMany_CollectionSelector_GeneratesInterceptor.verified.txt index 2a8d0fa1..48b91adb 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectManyTests.SelectMany_CollectionSelector_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectManyTests.SelectMany_CollectionSelector_GeneratesInterceptor.verified.txt @@ -6,15 +6,15 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SelectMany_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SelectMany_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func> __func) { // Source: o => o.Tags - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tags", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tags - var i361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Convert(i361d10c18_expr_0, typeof(global::System.Collections.Generic.IEnumerable)); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>>(i361d10c18_expr_1, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tags", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tags + var id115361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Convert(id115361d10c18_expr_0, typeof(global::System.Collections.Generic.IEnumerable)); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>>(id115361d10c18_expr_1, id115361d10c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.SelectMany( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectManyTests.SelectMany_WithResultSelector_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectManyTests.SelectMany_WithResultSelector_GeneratesInterceptor.verified.txt index 9da42854..b018af62 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectManyTests.SelectMany_WithResultSelector_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectManyTests.SelectMany_WithResultSelector_GeneratesInterceptor.verified.txt @@ -6,24 +6,24 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SelectMany_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SelectMany_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func> __func1, global::System.Func __func2) { // Source: o => o.Tags - var i361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tags", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tags - var i361d10c18a_expr_1 = global::System.Linq.Expressions.Expression.Convert(i361d10c18a_expr_0, typeof(global::System.Collections.Generic.IEnumerable)); - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>>(i361d10c18a_expr_1, i361d10c18a_p_o); + var id115361d10c18a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18a_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18a_p_o, typeof(global::TestNs.Order).GetProperty("Tags", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tags + var id115361d10c18a_expr_1 = global::System.Linq.Expressions.Expression.Convert(id115361d10c18a_expr_0, typeof(global::System.Collections.Generic.IEnumerable)); + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>>(id115361d10c18a_expr_1, id115361d10c18a_p_o); // Source: (o, t) => o.Name + ": " + t - var i361d10c18b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18b_p_t = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "t"); - var i361d10c18b_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c18b_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var i361d10c18b_expr_3 = global::System.Linq.Expressions.Expression.Constant(": ", typeof(string)); // ": " - var i361d10c18b_expr_1 = global::System.Linq.Expressions.Expression.Call(typeof(string).GetMethod("Concat", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(string), typeof(string) }, null), i361d10c18b_expr_2, i361d10c18b_expr_3); - var i361d10c18b_expr_0 = global::System.Linq.Expressions.Expression.Call(typeof(string).GetMethod("Concat", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(string), typeof(string) }, null), i361d10c18b_expr_1, i361d10c18b_p_t); - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18b_expr_0, i361d10c18b_p_o, i361d10c18b_p_t); + var id115361d10c18b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18b_p_t = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "t"); + var id115361d10c18b_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d10c18b_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var id115361d10c18b_expr_3 = global::System.Linq.Expressions.Expression.Constant(": ", typeof(string)); // ": " + var id115361d10c18b_expr_1 = global::System.Linq.Expressions.Expression.Call(typeof(string).GetMethod("Concat", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(string), typeof(string) }, null), id115361d10c18b_expr_2, id115361d10c18b_expr_3); + var id115361d10c18b_expr_0 = global::System.Linq.Expressions.Expression.Call(typeof(string).GetMethod("Concat", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(string), typeof(string) }, null), id115361d10c18b_expr_1, id115361d10c18b_p_t); + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18b_expr_0, id115361d10c18b_p_o, id115361d10c18b_p_t); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.SelectMany( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_AnonymousType_GeneratesGenericInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_AnonymousType_GeneratesGenericInterceptor.verified.txt index 80e83601..b45a44c0 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_AnonymousType_GeneratesGenericInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_AnonymousType_GeneratesGenericInterceptor.verified.txt @@ -6,17 +6,17 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Name } - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d9c33_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id - var i361d9c33_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(T0).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var i361d9c33_expr_3 = typeof(T1).GetConstructors()[0]; - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.New(i361d9c33_expr_3, new global::System.Linq.Expressions.Expression[] { i361d9c33_expr_1, i361d9c33_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Name") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d9c33_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id + var id115361d9c33_expr_2 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(T0).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var id115361d9c33_expr_3 = typeof(T1).GetConstructors()[0]; + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.New(id115361d9c33_expr_3, new global::System.Linq.Expressions.Expression[] { id115361d9c33_expr_1, id115361d9c33_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Name") }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_AnonymousType_WithComputedExpression_GeneratesCorrectly.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_AnonymousType_WithComputedExpression_GeneratesCorrectly.verified.txt index 76cad79c..e033ac23 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_AnonymousType_WithComputedExpression_GeneratesCorrectly.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_AnonymousType_WithComputedExpression_GeneratesCorrectly.verified.txt @@ -6,20 +6,20 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, Total = o.Price * o.Qty } - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i361d9c33_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id - var i361d9c33_expr_3 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(T0).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price - var i361d9c33_expr_5 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(T0).GetProperty("Qty", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Qty - var i361d9c33_expr_4 = global::System.Linq.Expressions.Expression.Convert(i361d9c33_expr_5, typeof(decimal)); - var i361d9c33_expr_2 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Multiply, i361d9c33_expr_3, i361d9c33_expr_4); - var i361d9c33_expr_6 = typeof(T1).GetConstructors()[0]; - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.New(i361d9c33_expr_6, new global::System.Linq.Expressions.Expression[] { i361d9c33_expr_1, i361d9c33_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Total") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); + var id115361d9c33_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(T0).GetProperty("Id", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Id + var id115361d9c33_expr_3 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(T0).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price + var id115361d9c33_expr_5 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(T0).GetProperty("Qty", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Qty + var id115361d9c33_expr_4 = global::System.Linq.Expressions.Expression.Convert(id115361d9c33_expr_5, typeof(decimal)); + var id115361d9c33_expr_2 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Multiply, id115361d9c33_expr_3, id115361d9c33_expr_4); + var id115361d9c33_expr_6 = typeof(T1).GetConstructors()[0]; + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.New(id115361d9c33_expr_6, new global::System.Linq.Expressions.Expression[] { id115361d9c33_expr_1, id115361d9c33_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Total") }); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return (global::ExpressiveSharp.IExpressiveQueryable)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_NamedType_GeneratesConcreteInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_NamedType_GeneratesConcreteInterceptor.verified.txt index d6f2404b..1eb2b418 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_NamedType_GeneratesConcreteInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SelectTests.Select_NamedType_GeneratesConcreteInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Name - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.ExceptBy_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.ExceptBy_GeneratesInterceptor.verified.txt index 629f7c52..dde8aad4 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.ExceptBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.ExceptBy_GeneratesInterceptor.verified.txt @@ -6,15 +6,15 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ExceptBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ExceptBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable second, global::System.Func __func) { // Source: o => o.Tag - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.ExceptBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.IntersectBy_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.IntersectBy_GeneratesInterceptor.verified.txt index 2294d24a..cc79b2da 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.IntersectBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.IntersectBy_GeneratesInterceptor.verified.txt @@ -6,15 +6,15 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_IntersectBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_IntersectBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable second, global::System.Func __func) { // Source: o => o.Tag - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.IntersectBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.UnionBy_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.UnionBy_GeneratesInterceptor.verified.txt index 5c0e9508..6f32178f 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.UnionBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.UnionBy_GeneratesInterceptor.verified.txt @@ -6,15 +6,15 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_UnionBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_UnionBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable second, global::System.Func __func) { // Source: o => o.Tag - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.UnionBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.CountBy_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.CountBy_GeneratesInterceptor.verified.txt index 11bef524..812bd144 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.CountBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.CountBy_GeneratesInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_CountBy_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_CountBy_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.CountBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.DistinctBy_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.DistinctBy_GeneratesInterceptor.verified.txt index 931c04c8..7ec9776d 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.DistinctBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.DistinctBy_GeneratesInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.DistinctBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.OrderByDescending_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.OrderByDescending_GeneratesInterceptor.verified.txt index b6a6f348..481c2b55 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.OrderByDescending_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.OrderByDescending_GeneratesInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderByDescending_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderByDescending_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.OrderByDescending( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.SkipWhile_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.SkipWhile_GeneratesInterceptor.verified.txt index a0bb5452..8ddfecb2 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.SkipWhile_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.SkipWhile_GeneratesInterceptor.verified.txt @@ -6,16 +6,16 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SkipWhile_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SkipWhile_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount < 50 - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c33_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var i361d9c33_expr_2 = global::System.Linq.Expressions.Expression.Constant(50, typeof(int)); // 50 - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.LessThan, i361d9c33_expr_1, i361d9c33_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c33_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var id115361d9c33_expr_2 = global::System.Linq.Expressions.Expression.Constant(50, typeof(int)); // 50 + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.LessThan, id115361d9c33_expr_1, id115361d9c33_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.SkipWhile( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.TakeWhile_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.TakeWhile_GeneratesInterceptor.verified.txt index 82385c60..94a40baf 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.TakeWhile_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.TakeWhile_GeneratesInterceptor.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_TakeWhile_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_TakeWhile_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Active", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.TakeWhile( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.ThenByDescending_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.ThenByDescending_GeneratesInterceptor.verified.txt index cb54d4b7..db4ff0b6 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.ThenByDescending_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.ThenByDescending_GeneratesInterceptor.verified.txt @@ -6,28 +6,28 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ThenByDescending_361d_11_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ThenByDescending_d115361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag - var i361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_o); + var id115361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c18_expr_0, id115361d11c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.ThenByDescending( (global::System.Linq.IOrderedQueryable)source, __lambda)); } [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Amount", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.OrderBy( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SynthesizedPropertyInterceptorTests.Select_ReferencesSynthesizedProperty.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SynthesizedPropertyInterceptorTests.Select_ReferencesSynthesizedProperty.verified.txt index 0be0ca04..921fd568 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SynthesizedPropertyInterceptorTests.Select_ReferencesSynthesizedProperty.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SynthesizedPropertyInterceptorTests.Select_ReferencesSynthesizedProperty.verified.txt @@ -6,14 +6,14 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_19_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_19_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: a => a.FullName - var i361d19c18_p_a = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Account), "a"); - var i361d19c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d19c18_p_a, typeof(global::TestNs.Account).GetProperty("FullName", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // a.FullName - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d19c18_expr_0, i361d19c18_p_a); + var id115361d19c18_p_a = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Account), "a"); + var id115361d19c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d19c18_p_a, typeof(global::TestNs.Account).GetProperty("FullName", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // a.FullName + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d19c18_expr_0, id115361d19c18_p_a); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SynthesizedPropertyInterceptorTests.Where_PropertyPattern_ReferencesSynthesizedProperty.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SynthesizedPropertyInterceptorTests.Where_PropertyPattern_ReferencesSynthesizedProperty.verified.txt index 04d33e40..3b3a86a2 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SynthesizedPropertyInterceptorTests.Where_PropertyPattern_ReferencesSynthesizedProperty.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SynthesizedPropertyInterceptorTests.Where_PropertyPattern_ReferencesSynthesizedProperty.verified.txt @@ -6,22 +6,22 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_21_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_d115361d_21_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: s => s is Rectangle { IsSquareProp: true } - var i361d21c18_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Shape), "s"); - var i361d21c18_expr_1 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Shape)); // s is Rectangle { IsSquareProp: true } - var i361d21c18_expr_0 = global::System.Linq.Expressions.Expression.NotEqual(i361d21c18_p_s, i361d21c18_expr_1); - var i361d21c18_expr_2 = global::System.Linq.Expressions.Expression.TypeIs(i361d21c18_p_s, typeof(global::TestNs.Rectangle)); - var i361d21c18_expr_3 = global::System.Linq.Expressions.Expression.Convert(i361d21c18_p_s, typeof(global::TestNs.Rectangle)); - var i361d21c18_expr_4 = global::System.Linq.Expressions.Expression.Property(i361d21c18_expr_3, typeof(global::TestNs.Rectangle).GetProperty("IsSquareProp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); - var i361d21c18_expr_6 = global::System.Linq.Expressions.Expression.Constant(true, typeof(bool)); // true - var i361d21c18_expr_5 = global::System.Linq.Expressions.Expression.Equal(i361d21c18_expr_4, i361d21c18_expr_6); - var i361d21c18_expr_7 = global::System.Linq.Expressions.Expression.AndAlso(i361d21c18_expr_0, i361d21c18_expr_2); - var i361d21c18_expr_8 = global::System.Linq.Expressions.Expression.AndAlso(i361d21c18_expr_7, i361d21c18_expr_5); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d21c18_expr_8, i361d21c18_p_s); + var id115361d21c18_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Shape), "s"); + var id115361d21c18_expr_1 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Shape)); // s is Rectangle { IsSquareProp: true } + var id115361d21c18_expr_0 = global::System.Linq.Expressions.Expression.NotEqual(id115361d21c18_p_s, id115361d21c18_expr_1); + var id115361d21c18_expr_2 = global::System.Linq.Expressions.Expression.TypeIs(id115361d21c18_p_s, typeof(global::TestNs.Rectangle)); + var id115361d21c18_expr_3 = global::System.Linq.Expressions.Expression.Convert(id115361d21c18_p_s, typeof(global::TestNs.Rectangle)); + var id115361d21c18_expr_4 = global::System.Linq.Expressions.Expression.Property(id115361d21c18_expr_3, typeof(global::TestNs.Rectangle).GetProperty("IsSquareProp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); + var id115361d21c18_expr_6 = global::System.Linq.Expressions.Expression.Constant(true, typeof(bool)); // true + var id115361d21c18_expr_5 = global::System.Linq.Expressions.Expression.Equal(id115361d21c18_expr_4, id115361d21c18_expr_6); + var id115361d21c18_expr_7 = global::System.Linq.Expressions.Expression.AndAlso(id115361d21c18_expr_0, id115361d21c18_expr_2); + var id115361d21c18_expr_8 = global::System.Linq.Expressions.Expression.AndAlso(id115361d21c18_expr_7, id115361d21c18_expr_5); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d21c18_expr_8, id115361d21c18_p_s); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Where( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.ChainedWhereAndSelect_GeneratesTwoInterceptors.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.ChainedWhereAndSelect_GeneratesTwoInterceptors.verified.txt index 00ecc672..ba0a16b0 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.ChainedWhereAndSelect_GeneratesTwoInterceptors.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.ChainedWhereAndSelect_GeneratesTwoInterceptors.verified.txt @@ -6,30 +6,30 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_11_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_d115361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Name - var i361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_o); + var id115361d11c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c18_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c18_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c18_expr_0, id115361d11c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Select( (global::System.Linq.IQueryable)source, __lambda)); } [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_10_18( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_d115361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag == "urgent" - var i361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var i361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" - var i361d10c18_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i361d10c18_expr_1, i361d10c18_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_p_o); + var id115361d10c18_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d10c18_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d10c18_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var id115361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" + var id115361d10c18_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, id115361d10c18_expr_1, id115361d10c18_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d10c18_expr_0, id115361d10c18_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Where( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_CapturedInstanceField_GeneratesClosureAccess.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_CapturedInstanceField_GeneratesClosureAccess.verified.txt index 440a3b2f..617a1262 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_CapturedInstanceField_GeneratesClosureAccess.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_CapturedInstanceField_GeneratesClosureAccess.verified.txt @@ -6,16 +6,16 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_11_33( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_d115361d_11_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Price > _minPrice - var i361d11c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c33_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d11c33_p_o, typeof(global::TestNs.Order).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price - var i361d11c33_expr_2 = __ClosureHelper.ResolveCapturedInstanceMember(__func, typeof(global::TestNs.TestClass), "_minPrice"); // _minPrice - var i361d11c33_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i361d11c33_expr_1, i361d11c33_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c33_expr_0, i361d11c33_p_o); + var id115361d11c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c33_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d11c33_p_o, typeof(global::TestNs.Order).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price + var id115361d11c33_expr_2 = __ClosureHelper.ResolveCapturedInstanceMember(__func, typeof(global::TestNs.TestClass), "_minPrice"); // _minPrice + var id115361d11c33_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, id115361d11c33_expr_1, id115361d11c33_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c33_expr_0, id115361d11c33_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Where( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_CapturedVariable_GeneratesClosureAccess.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_CapturedVariable_GeneratesClosureAccess.verified.txt index 48fe0e5f..c58583a7 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_CapturedVariable_GeneratesClosureAccess.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_CapturedVariable_GeneratesClosureAccess.verified.txt @@ -6,16 +6,16 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Price > minPrice - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c33_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price - var i361d9c33_expr_2 = global::System.Linq.Expressions.Expression.MakeMemberAccess(global::System.Linq.Expressions.Expression.Constant(__func.Target), __func.Target.GetType().GetField("minPrice", global::System.Reflection.BindingFlags.Instance | global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic)); // minPrice - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i361d9c33_expr_1, i361d9c33_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c33_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Price", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Price + var id115361d9c33_expr_2 = global::System.Linq.Expressions.Expression.MakeMemberAccess(global::System.Linq.Expressions.Expression.Constant(__func.Target), __func.Target.GetType().GetField("minPrice", global::System.Reflection.BindingFlags.Instance | global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic)); // minPrice + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, id115361d9c33_expr_1, id115361d9c33_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Where( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_SimpleCondition_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_SimpleCondition_GeneratesInterceptor.verified.txt index 2ef163c1..a86fed51 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_SimpleCondition_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.Where_SimpleCondition_GeneratesInterceptor.verified.txt @@ -6,16 +6,16 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_9_33( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_d115361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag == "urgent" - var i361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d9c33_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag - var i361d9c33_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" - var i361d9c33_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i361d9c33_expr_1, i361d9c33_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_p_o); + var id115361d9c33_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d9c33_expr_1 = global::System.Linq.Expressions.Expression.Property(id115361d9c33_p_o, typeof(global::TestNs.Order).GetProperty("Tag", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Tag + var id115361d9c33_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" + var id115361d9c33_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, id115361d9c33_expr_1, id115361d9c33_expr_2); + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d9c33_expr_0, id115361d9c33_p_o); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Where( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ZipTests.Zip_WithResultSelector_GeneratesInterceptor.verified.txt b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ZipTests.Zip_WithResultSelector_GeneratesInterceptor.verified.txt index 2a5c0a3f..24bfa212 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ZipTests.Zip_WithResultSelector_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ZipTests.Zip_WithResultSelector_GeneratesInterceptor.verified.txt @@ -6,16 +6,16 @@ namespace ExpressiveSharp.Generated.Interceptors internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Zip_361d_11_19( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Zip_d115361d_11_19( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable second, global::System.Func __func) { // Source: (o, p) => o.Name - var i361d11c19_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i361d11c19_p_p = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Price), "p"); - var i361d11c19_expr_0 = global::System.Linq.Expressions.Expression.Property(i361d11c19_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19_expr_0, i361d11c19_p_o, i361d11c19_p_p); + var id115361d11c19_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); + var id115361d11c19_p_p = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Price), "p"); + var id115361d11c19_expr_0 = global::System.Linq.Expressions.Expression.Property(id115361d11c19_p_o, typeof(global::TestNs.Order).GetProperty("Name", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance)); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(id115361d11c19_expr_0, id115361d11c19_p_o, id115361d11c19_p_p); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Zip( (global::System.Linq.IQueryable)source,