diff --git a/benchmarks/ExpressiveSharp.Benchmarks/PolyfillGeneratorBenchmarks.cs b/benchmarks/ExpressiveSharp.Benchmarks/PolyfillGeneratorBenchmarks.cs index c7c911f9..244bcd88 100644 --- a/benchmarks/ExpressiveSharp.Benchmarks/PolyfillGeneratorBenchmarks.cs +++ b/benchmarks/ExpressiveSharp.Benchmarks/PolyfillGeneratorBenchmarks.cs @@ -7,94 +7,283 @@ namespace ExpressiveSharp.Benchmarks; +/// +/// Baseline: all call sites in a single source file. +/// Varies to show how cost scales with site count. +/// +/// NOTE – two benchmark variants: +/// +/// * — uses RunGenerators (generator pipeline only, no compilation update). +/// The O(N) overhead here comes from the driver maintaining N cached output entries in its +/// internal state. +/// *_E2E — uses RunGeneratorsAndUpdateCompilation (full pipeline including +/// the Roslyn compilation rebuild). +/// This variant measures end-to-end cost, including applying generated sources to the +/// compilation, so results reflect both generator work and compilation-update overhead. +/// Use this variant when comparing overall IDE-like responsiveness rather than isolated +/// generator-pipeline cost. +/// +/// [MemoryDiagnoser] -public class PolyfillGeneratorBenchmarks +public class PolyfillSingleFileBenchmarks { - [Params(1, 100)] + [Params(1, 10, 100)] public int CallSiteCount { get; set; } private Compilation _compilation = null!; private GeneratorDriver _warmedDriver = null!; - private Compilation _modifiedCompilation = null!; + // Entity file (Polyfill0.cs) has NO call sites — editing it should trigger zero re-transforms. + private Compilation _entityFileModified = null!; + // Query file (Polyfill1.cs) contains the call sites — editing it forces all N re-transforms. + private Compilation _queryFileModified = null!; [GlobalSetup] public void Setup() { - var sources = BuildPolyfillSources(CallSiteCount); - _compilation = CreatePolyfillCompilation(sources); + var sources = BuildSources(CallSiteCount); + _compilation = CreateCompilation(sources); _warmedDriver = CSharpGeneratorDriver .Create(new PolyfillInterceptorGenerator()) - .RunGeneratorsAndUpdateCompilation(_compilation, out _, out _); + .RunGenerators(_compilation); + + // index 0 = entity (no call sites) + var entityTree = _compilation.SyntaxTrees.ElementAt(0); + _entityFileModified = _compilation.ReplaceSyntaxTree( + entityTree, + entityTree.WithChangedText(SourceText.From(entityTree.GetText() + "\n// bench-edit"))); - var firstTree = _compilation.SyntaxTrees.First(); - _modifiedCompilation = _compilation.ReplaceSyntaxTree( - firstTree, - firstTree.WithChangedText(SourceText.From(firstTree.GetText() + "\n// bench-edit"))); + // index 1 = queries (CallSiteCount call sites) + var queryTree = _compilation.SyntaxTrees.ElementAt(1); + _queryFileModified = _compilation.ReplaceSyntaxTree( + queryTree, + queryTree.WithChangedText(SourceText.From(queryTree.GetText() + "\n// bench-edit"))); } + // ── Generator-only (no compilation rebuild) ────────────────────────────── + + /// + /// Fresh driver, runs all per-node transforms from scratch. + /// [Benchmark(Baseline = true)] - public GeneratorDriver RunGenerator() + public GeneratorDriver Cold() + => CSharpGeneratorDriver + .Create(new PolyfillInterceptorGenerator()) + .RunGenerators(_compilation); + + /// + /// Incremental edit on a file with ZERO call sites. + /// Zero transforms should re-run; cost above baseline = pipeline evaluation overhead only. + /// + [Benchmark] + public GeneratorDriver Incremental_EditEntityFile() + => _warmedDriver.RunGenerators(_entityFileModified); + + /// + /// Incremental edit on the file containing all call sites. + /// All transforms must re-run; shows the per-site transform cost. + /// Should be ≈ Cold. + /// + [Benchmark] + public GeneratorDriver Incremental_EditQueryFile() + => _warmedDriver.RunGenerators(_queryFileModified); + + // ── End-to-end (generator + Roslyn compilation rebuild) ────────────────── + // Compilation-rebuild cost dominates at large N; see the generator-only variants above + // for a clean measurement of caching savings. + + [Benchmark] + public GeneratorDriver Cold_E2E() => CSharpGeneratorDriver .Create(new PolyfillInterceptorGenerator()) .RunGeneratorsAndUpdateCompilation(_compilation, out _, out _); [Benchmark] - public GeneratorDriver RunGenerator_Incremental() - => _warmedDriver - .RunGeneratorsAndUpdateCompilation(_modifiedCompilation, out _, out _); + public GeneratorDriver Incremental_EditEntityFile_E2E() + => _warmedDriver.RunGeneratorsAndUpdateCompilation(_entityFileModified, out _, out _); - private static Compilation CreatePolyfillCompilation(IReadOnlyList sources) - { - var references = Basic.Reference.Assemblies.Net100.References.All.ToList(); - references.Add(MetadataReference.CreateFromFile(typeof(ExpressiveAttribute).Assembly.Location)); + [Benchmark] + public GeneratorDriver Incremental_EditQueryFile_E2E() + => _warmedDriver.RunGeneratorsAndUpdateCompilation(_queryFileModified, out _, out _); + private static Compilation CreateCompilation(IReadOnlyList sources) + { + var refs = Basic.Reference.Assemblies.Net100.References.All.ToList(); + refs.Add(MetadataReference.CreateFromFile(typeof(ExpressiveAttribute).Assembly.Location)); return CSharpCompilation.Create( - "PolyfillBenchmarkInput", - sources.Select((s, idx) => CSharpSyntaxTree.ParseText(s, path: $"Polyfill{idx}.cs")), - references, + "PolyfillSingleFileBench", + sources.Select((s, i) => CSharpSyntaxTree.ParseText(s, path: $"Polyfill{i}.cs")), + refs, new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)); } - private static IReadOnlyList BuildPolyfillSources(int callSiteCount) + private static IReadOnlyList BuildSources(int callSiteCount) { - var sources = new List(); - - // Entity class - sources.Add(@" + var sources = new List + { + // index 0: entity — NO call sites + @" using System; using System.Linq; using ExpressiveSharp; +namespace PolyfillBench; +public class BenchEntity { public int Id { get; set; } public string Name { get; set; } = """"; } +" + }; + + // index 1: queries — all callSiteCount call sites + var sb = new StringBuilder(); + sb.AppendLine("using System.Linq; using ExpressiveSharp; namespace PolyfillBench;"); + sb.AppendLine("public static class Queries {"); + for (var i = 0; i < callSiteCount; i++) + sb.AppendLine($" public static IQueryable Q{i}(IExpressiveQueryable q) => q.Select(x => x.Id + {i});"); + sb.AppendLine("}"); + sources.Add(sb.ToString()); -namespace PolyfillBenchmarkInput; + return sources; + } +} -public class BenchEntity +/// +/// Multi-file scenario: call sites spread across source files. +/// Each file contains a fixed call sites. +/// Demonstrates the key incremental-caching benefit from the no-Collect() pipeline design: +/// each call site registers its output independently, so only changed files are re-processed. +/// +/// Key comparisons (generator-only variants): +/// +/// Cold — all FileCount × CallSitesPerFile transforms from scratch. Should scale linearly. +/// Incremental_EditCallSiteFile — only 1 file re-processed (CallSitesPerFile transforms). Cost ≈ constant regardless of FileCount. +/// Incremental_EditNoiseFile — zero transforms re-run; pipeline overhead only. Cost ≈ constant regardless of FileCount. +/// +/// Expected: Cold grows linearly; Incremental_EditCallSiteFile and +/// Incremental_EditNoiseFile stay near-flat as grows. +/// The difference between them = cost of transforms. +/// +/// Why this works: Instead of snippets.Collect() (which forces O(total_sites) +/// array re-assembly on every run), each snippet is registered directly via +/// RegisterSourceOutput. Roslyn's per-output cache means unchanged call sites' +/// output files are served from cache with zero work. +/// +/// E2E variants include the Roslyn compilation-rebuild cost which also scales +/// with file count and can partially mask the generator savings. +/// +[MemoryDiagnoser] +public class PolyfillMultiFileBenchmarks { - public int Id { get; set; } - public string Name { get; set; } = string.Empty; - public decimal Amount { get; set; } -} -"); + [Params(1, 5, 10)] + public int FileCount { get; set; } - // Call sites — each in its own method to generate distinct interceptors - var sb = new StringBuilder(); - sb.AppendLine("using System;"); - sb.AppendLine("using System.Linq;"); - sb.AppendLine("using ExpressiveSharp;"); - sb.AppendLine(); - sb.AppendLine("namespace PolyfillBenchmarkInput;"); - sb.AppendLine(); - sb.AppendLine("public static class Queries"); - sb.AppendLine("{"); + private const int CallSitesPerFile = 5; - for (var i = 0; i < callSiteCount; i++) + private Compilation _compilation = null!; + private GeneratorDriver _warmedDriver = null!; + private Compilation _callSiteFileModified = null!; + private Compilation _noiseFileModified = null!; + + [GlobalSetup] + public void Setup() + { + var sources = BuildSources(FileCount, CallSitesPerFile); + _compilation = CreateCompilation(sources); + + _warmedDriver = CSharpGeneratorDriver + .Create(new PolyfillInterceptorGenerator()) + .RunGenerators(_compilation); + + // Index FileCount = last query file (has CallSitesPerFile call sites) + var callSiteTree = _compilation.SyntaxTrees.ElementAt(FileCount); + _callSiteFileModified = _compilation.ReplaceSyntaxTree( + callSiteTree, + callSiteTree.WithChangedText(SourceText.From(callSiteTree.GetText() + "\n// bench-edit"))); + + // Index FileCount + 1 = noise file (zero call sites) + var noiseTree = _compilation.SyntaxTrees.ElementAt(FileCount + 1); + _noiseFileModified = _compilation.ReplaceSyntaxTree( + noiseTree, + noiseTree.WithChangedText(SourceText.From(noiseTree.GetText() + "\n// bench-edit"))); + } + + // ── Generator-only (no compilation rebuild) ────────────────────────────── + + /// All FileCount × CallSitesPerFile transforms run from scratch. + [Benchmark(Baseline = true)] + public GeneratorDriver Cold() + => CSharpGeneratorDriver + .Create(new PolyfillInterceptorGenerator()) + .RunGenerators(_compilation); + + /// + /// Edits a file that contains call sites. + /// That file's transforms re-run; all other files' transforms come from cache. + /// Cost ≈ transforms regardless of . + /// + [Benchmark] + public GeneratorDriver Incremental_EditCallSiteFile() + => _warmedDriver.RunGenerators(_callSiteFileModified); + + /// + /// Edits a file with NO call sites. + /// Zero transforms should re-run. Expected cost ≈ pipeline overhead only (near-flat vs FileCount). + /// The gap vs Incremental_EditCallSiteFile isolates the per-site transform cost. + /// + [Benchmark] + public GeneratorDriver Incremental_EditNoiseFile() + => _warmedDriver.RunGenerators(_noiseFileModified); + + // ── End-to-end (generator + Roslyn compilation rebuild) ────────────────── + + [Benchmark] + public GeneratorDriver Cold_E2E() + => CSharpGeneratorDriver + .Create(new PolyfillInterceptorGenerator()) + .RunGeneratorsAndUpdateCompilation(_compilation, out _, out _); + + [Benchmark] + public GeneratorDriver Incremental_EditCallSiteFile_E2E() + => _warmedDriver.RunGeneratorsAndUpdateCompilation(_callSiteFileModified, out _, out _); + + [Benchmark] + public GeneratorDriver Incremental_EditNoiseFile_E2E() + => _warmedDriver.RunGeneratorsAndUpdateCompilation(_noiseFileModified, out _, out _); + + private static Compilation CreateCompilation(IReadOnlyList sources) + { + var refs = Basic.Reference.Assemblies.Net100.References.All.ToList(); + refs.Add(MetadataReference.CreateFromFile(typeof(ExpressiveAttribute).Assembly.Location)); + return CSharpCompilation.Create( + "PolyfillMultiFileBench", + sources.Select((s, i) => CSharpSyntaxTree.ParseText(s, path: $"Polyfill{i}.cs")), + refs, + new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)); + } + + private static IReadOnlyList BuildSources(int fileCount, int sitesPerFile) + { + // index 0: entity + var sources = new List { - sb.AppendLine($" public static IQueryable Query{i}(IExpressiveQueryable q)"); - sb.AppendLine($" => q.Select(x => x.Id + {i});"); + @"using System.Linq; using ExpressiveSharp; namespace PolyfillBench; +public class BenchEntity { public int Id { get; set; } public string Name { get; set; } = """"; }" + }; + + // indices 1..fileCount: query files + var sb = new StringBuilder(); + for (var f = 0; f < fileCount; f++) + { + sb.Clear(); + sb.AppendLine("using System.Linq; using ExpressiveSharp; namespace PolyfillBench;"); + sb.AppendLine($"public static class Queries{f} {{"); + for (var i = 0; i < sitesPerFile; i++) + sb.AppendLine($" public static IQueryable Q{f}_{i}(IExpressiveQueryable q) => q.Select(x => x.Id + {f * 100 + i});"); + sb.AppendLine("}"); + sources.Add(sb.ToString()); } - sb.AppendLine("}"); - sources.Add(sb.ToString()); + // index fileCount + 1: noise — no call sites at all + sources.Add(@"namespace PolyfillBench; +/// No IExpressiveQueryable here — editing this file should cost zero generator work. +public static class BenchHelper { public static string Describe(int id) => $""#{id}""; }"); return sources; } diff --git a/src/ExpressiveSharp.Generator/PolyfillInterceptorGenerator.cs b/src/ExpressiveSharp.Generator/PolyfillInterceptorGenerator.cs index cf4c0e2f..e211d711 100644 --- a/src/ExpressiveSharp.Generator/PolyfillInterceptorGenerator.cs +++ b/src/ExpressiveSharp.Generator/PolyfillInterceptorGenerator.cs @@ -1,11 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Linq; using System.Text; using ExpressiveSharp.Generator.Infrastructure; -using ExpressiveSharp.Generator.Models; -using ExpressiveSharp.Generator.SyntaxRewriters; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; @@ -102,53 +96,97 @@ file static class __ClosureHelper public void Initialize(IncrementalGeneratorInitializationContext context) { - // Syntactic pre-filter: any member-access invocation with at least one argument - // is a candidate. The semantic check in Emit does the real filtering. - var candidates = context.SyntaxProvider.CreateSyntaxProvider( - predicate: static (node, _) => - node is InvocationExpressionSyntax inv && - inv.Expression is MemberAccessExpressionSyntax && - inv.ArgumentList.Arguments.Count > 0, - transform: static (ctx, _) => (InvocationExpressionSyntax)ctx.Node); - - var globalOptions = context.AnalyzerConfigOptionsProvider - .Select(static (opts, _) => new ExpressiveGlobalOptions(opts.GlobalOptions)); - - // Combine with the full compilation so we can do semantic analysis in the output step. - context.RegisterSourceOutput( - candidates.Collect().Combine(context.CompilationProvider).Combine(globalOptions), - static (spc, pair) => Emit(pair.Left.Left, pair.Left.Right, pair.Right, spc)); + // One pipeline item per SOURCE FILE (CompilationUnitSyntax = root node of each file). + // The syntactic scan filters out files that have no candidate invocations at all. + // This gives us one generated file per user source file — clean and predictable. + var candidateFiles = context.SyntaxProvider.CreateSyntaxProvider( + predicate: static (node, _) => node is CompilationUnitSyntax, + transform: static (ctx, ct) => + { + ct.ThrowIfCancellationRequested(); + var unit = (CompilationUnitSyntax)ctx.Node; + // Quick syntactic pre-filter: any member-access invocation with ≥1 argument? + foreach (var descendant in unit.DescendantNodes()) + { + if (descendant is InvocationExpressionSyntax inv && + inv.Expression is MemberAccessExpressionSyntax && + inv.ArgumentList.Arguments.Count > 0) + return unit; + } + return null; + }) + .Where(static x => x is not null) + .Select(static (x, _) => x!); + + // Combine with the compilation so ProcessFileAndEmit can build a SemanticModel. + // + // WithComparer uses REFERENCE equality on the CompilationUnitSyntax root node: + // • Roslyn syntax trees are immutable — editing a noise file creates a new + // Compilation but keeps every other file's syntax tree root as the EXACT + // SAME object reference across incremental runs. + // • All untouched source files compare as "equal" → RegisterSourceOutput + // skipped entirely → O(1) incremental cost for noise-file edits. + // • Only files that were actually edited get a new root reference → re-run. + var filesWithCompilation = candidateFiles + .Combine(context.CompilationProvider) + .WithComparer(CompilationUnitAndCompilationComparer.Instance); + + // All semantic analysis, code emission, and EXP_EMIT_FAILED diagnostic reporting + // happen inside ProcessFileAndEmit. One output file is produced per source file, + // containing all interceptors for that file. + context.RegisterSourceOutput(filesWithCompilation, + static (spc, pair) => ProcessFileAndEmit(pair.Left, pair.Right, spc)); } - // ── Emission ───────────────────────────────────────────────────────────── + // ── Per-file processing and emission ──────────────────────────────────── - private static void Emit( - ImmutableArray invocations, + /// + /// Processes all candidate call sites in one source file and emits a single + /// interceptor file containing all generated methods for that file. + /// Called from RegisterSourceOutput; Roslyn replays cached output when + /// signals the file is unchanged. + /// + private static void ProcessFileAndEmit( + CompilationUnitSyntax unit, Compilation compilation, - ExpressiveGlobalOptions globalOptions, SourceProductionContext spc) { - var methodsBuilder = new StringBuilder(); - var snippetCount = 0; + var ct = spc.CancellationToken; + var model = compilation.GetSemanticModel(unit.SyntaxTree); + var sourcePath = unit.SyntaxTree.FilePath; + var fileTag = GetFileTag(sourcePath); + + var methodCodes = new List(); + var needsClosureHelper = false; - foreach (var inv in invocations) + foreach (var descendant in unit.DescendantNodes()) { - spc.CancellationToken.ThrowIfCancellationRequested(); + if (descendant is not InvocationExpressionSyntax inv) continue; + if (inv.Expression is not MemberAccessExpressionSyntax) continue; + if (inv.ArgumentList.Arguments.Count == 0) continue; + ct.ThrowIfCancellationRequested(); try { - var snippet = TryEmitPolyfill(inv, compilation, spc, snippetCount, globalOptions) - ?? TryEmit(inv, compilation, spc, snippetCount, globalOptions); - if (snippet is not null) - { - methodsBuilder.Append(snippet); - snippetCount++; - } + // Use the METHOD NAME token position for stable, unique naming. + // Using the invocation's span-start would collide in chained calls + // (e.g. query.AsExpressive().Where(…) — both start at 'query'). + var ma = (MemberAccessExpressionSyntax)inv.Expression; + var nameLineSpan = ma.Name.GetLocation().GetLineSpan(); + var line = nameLineSpan.StartLinePosition.Line; + var col = nameLineSpan.StartLinePosition.Character; + + var methodCode = TryEmitPolyfill(inv, model, line, col, fileTag, spc) + ?? TryEmit(inv, model, line, col, fileTag, spc); + if (methodCode is null) continue; + + methodCodes.Add(methodCode); + if (methodCode.Contains("__ClosureHelper")) + needsClosureHelper = true; } - catch (Exception ex) when (ex is not OperationCanceledException) + catch (OperationCanceledException) { throw; } + catch (Exception ex) { - // Report the failure so it doesn't hide bugs silently. - // The stub body will throw UnreachableException at runtime with a clear message. spc.ReportDiagnostic(Diagnostic.Create( Diagnostics.InterceptorEmissionFailed, inv.GetLocation(), @@ -156,19 +194,19 @@ private static void Emit( } } - if (snippetCount == 0) return; + if (methodCodes.Count == 0) return; - var methods = methodsBuilder.ToString(); - var closureHelper = methods.Contains("__ClosureHelper") ? ClosureHelperSource : ""; + var allMethods = string.Concat(methodCodes); + var closureHelper = needsClosureHelper ? ClosureHelperSource : ""; var source = $$""" // #nullable disable namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { - {{methods}} }{{closureHelper}} + {{allMethods}} }{{closureHelper}} } namespace System.Runtime.CompilerServices @@ -181,10 +219,49 @@ public InterceptsLocationAttribute(int version, string data) { } } """; - spc.AddSource("PolyfillInterceptors.g.cs", + spc.AddSource(ComputeOutputFileName(sourcePath), SourceText.From(source, Encoding.UTF8)); } + /// + /// Computes a stable output file name for a given source file. + /// One interceptor file is generated per source file, keyed by the full 32-bit + /// FNV-1a hash of the source path. + /// + private static string ComputeOutputFileName(string sourcePath) + { + unchecked + { + var hash = 2166136261u; + for (var i = 0; i < sourcePath.Length; i++) + { + hash ^= (uint)sourcePath[i]; + hash *= 16777619u; + } + return "PolyfillInterceptors_" + hash.ToString("x8") + ".g.cs"; + } + } + + /// + /// Returns a short (4-char hex) tag derived from the source file path hash. + /// Used as a prefix in interceptor method names to prevent collisions between + /// files that have call sites at identical line/col positions. + /// + private static string GetFileTag(string sourcePath) + { + unchecked + { + var hash = 2166136261u; + for (var i = 0; i < sourcePath.Length; i++) + { + hash ^= (uint)sourcePath[i]; + hash *= 16777619u; + } + return (hash & 0xFFFFu).ToString("x4"); + } + } + + // ── ExpressionPolyfill.Create() interception ────────────────────────── /// @@ -192,15 +269,13 @@ public InterceptsLocationAttribute(int version, string data) { } /// an interceptor that returns a literal Expression<TDelegate> with the /// rewritten lambda body. /// - private static string? TryEmitPolyfill( - InvocationExpressionSyntax inv, - Compilation compilation, - SourceProductionContext spc, - int index, - ExpressiveGlobalOptions globalOptions) + private static string? TryEmitPolyfill(InvocationExpressionSyntax inv, + SemanticModel model, + int line, + int col, + string fileTag, + SourceProductionContext spc) { - var model = compilation.GetSemanticModel(inv.SyntaxTree); - if (model.GetSymbolInfo(inv).Symbol is not IMethodSymbol method) return null; @@ -219,12 +294,10 @@ public InterceptsLocationAttribute(int version, string data) { } return null; var hasTransformers = method.Parameters.Length == 2; - var interceptableLocation = Microsoft.CodeAnalysis.CSharp.CSharpExtensions.GetInterceptableLocation( - model, inv, spc.CancellationToken); + var interceptableLocation = model.GetInterceptableLocation(inv, spc.CancellationToken); if (interceptableLocation is null) return null; - var interceptAttr = Microsoft.CodeAnalysis.CSharp.CSharpExtensions - .GetInterceptsLocationAttributeSyntax(interceptableLocation); + var interceptAttr = interceptableLocation.GetInterceptsLocationAttributeSyntax(); // Extract the delegate type — e.g., Func var delegateType = method.TypeArguments[0]; @@ -233,7 +306,6 @@ public InterceptsLocationAttribute(int version, string data) { } // Default to Rewrite (the whole point of Polyfill is enabling expression tree features), // but allow MSBuild global property to override. - // Get the parameter types from the delegate to build Expression // For Func, the lambda parameters map to T1..Tn if (delegateType is not INamedTypeSymbol delegateNamed || delegateNamed.TypeArguments.IsEmpty) @@ -245,9 +317,8 @@ public InterceptsLocationAttribute(int version, string data) { } return null; // Use ExpressionTreeEmitter to build the expression tree - var exprTypeFqn = $"global::System.Linq.Expressions.Expression<{delegateFqn}>"; - var emitResult = EmitLambdaBody(lam, elemSymbol, model, spc, globalOptions, delegateFqn, - varPrefix: $"i{index}_", delegateVarName: "__func"); + var emitResult = EmitLambdaBody(lam, elemSymbol, model, spc, delegateFqn, + varPrefix: $"i{fileTag}{line}c{col}_", delegateVarName: "__func"); if (emitResult is null) return null; @@ -255,7 +326,7 @@ public InterceptsLocationAttribute(int version, string data) { } { return $$""" {{interceptAttr}} - internal static global::System.Linq.Expressions.Expression<{{delegateFqn}}> {{MethodId("Create", index)}}( + internal static global::System.Linq.Expressions.Expression<{{delegateFqn}}> {{MethodId("Create", fileTag, line, col)}}( {{delegateFqn}} __func, params global::ExpressiveSharp.IExpressionTreeTransformer[] transformers) { @@ -269,7 +340,7 @@ public InterceptsLocationAttribute(int version, string data) { } return $$""" {{interceptAttr}} - internal static global::System.Linq.Expressions.Expression<{{delegateFqn}}> {{MethodId("Create", index)}}( + internal static global::System.Linq.Expressions.Expression<{{delegateFqn}}> {{MethodId("Create", fileTag, line, col)}}( {{delegateFqn}} __func) { {{emitResult.Body}} return __lambda; @@ -280,14 +351,13 @@ public InterceptsLocationAttribute(int version, string data) { } // ── Per-invocation dispatch (IExpressiveQueryable) ─────────────────────── - private static string? TryEmit( - InvocationExpressionSyntax inv, - Compilation compilation, - SourceProductionContext spc, - int index, - ExpressiveGlobalOptions globalOptions) + private static string? TryEmit(InvocationExpressionSyntax inv, + SemanticModel model, + int line, + int col, + string fileTag, + SourceProductionContext spc) { - var model = compilation.GetSemanticModel(inv.SyntaxTree); var ma = (MemberAccessExpressionSyntax)inv.Expression; // Receiver must be or implement IExpressiveQueryable. @@ -321,14 +391,12 @@ public InterceptsLocationAttribute(int version, string data) { } // Get the interceptable location using the Roslyn 5.0+ API. // This produces the correct [InterceptsLocation(version, data)] attribute text. - var interceptableLocation = Microsoft.CodeAnalysis.CSharp.CSharpExtensions.GetInterceptableLocation( - model, inv, spc.CancellationToken); + var interceptableLocation = model.GetInterceptableLocation(inv, spc.CancellationToken); if (interceptableLocation is null) return null; - var interceptAttr = Microsoft.CodeAnalysis.CSharp.CSharpExtensions - .GetInterceptsLocationAttributeSyntax(interceptableLocation); + var interceptAttr = interceptableLocation.GetInterceptsLocationAttributeSyntax(); // Element type T of IExpressiveQueryable. // The receiver may be IExpressiveQueryable directly, or a type that implements it. @@ -337,7 +405,7 @@ public InterceptsLocationAttribute(int version, string data) { } return null; var elementType = rewritableInterface.TypeArguments[0]; if (elementType is not INamedTypeSymbol elementSymbol) - return null; // Skip when T is itself a type parameter + return null; var elementFqn = elementType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); var methodName = ma.Name.Identifier.Text; @@ -354,7 +422,8 @@ public InterceptsLocationAttribute(int version, string data) { } targetTypeFqn = targetType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); } - return EmitGenericLambda(inv, model, spc, interceptAttr, index, methodName, elementSymbol, elementFqn, method, funcParamIndices, targetTypeFqn, globalOptions); + return EmitGenericLambda(inv, model, spc, interceptAttr, line, col, fileTag, + methodName, elementSymbol, elementFqn, method, funcParamIndices, targetTypeFqn); } // ── Lambda helpers ─────────────────────────────────────────────────────── @@ -366,10 +435,8 @@ public InterceptsLocationAttribute(int version, string data) { } private static Emitter.EmitResult? EmitLambdaBody( LambdaExpressionSyntax lambda, INamedTypeSymbol elementSymbol, - SemanticModel model, SourceProductionContext spc, - ExpressiveGlobalOptions globalOptions, string delegateTypeFqn, string assignToVariable = "__lambda", string varPrefix = "", @@ -453,7 +520,16 @@ private static bool IsAnonymousType(ITypeSymbol type) // ── Formatting helpers ─────────────────────────────────────────────────── - private static string MethodId(string op, int index) => $"__Polyfill_{op}_{index}"; + /// + /// Produces a unique, stable interceptor method name based on the call site's + /// source file hash + method-name-token position (line/col). + /// The file hash disambiguates call sites across different source files that happen + /// to share the same line/col (e.g., two files both have an OrderBy at 44:13). + /// The position component disambiguates multiple call sites within the same file. + /// Adding/removing methods in other files never shifts these identifiers. + /// + private static string MethodId(string op, string fileTag, int line, int col) + => $"__Polyfill_{op}_{fileTag}_{line}_{col}"; /// /// Generic lambda emitter for all LINQ operators and user-defined stubs. @@ -465,11 +541,10 @@ private static bool IsAnonymousType(ITypeSymbol type) /// Non-lambda parameters are forwarded directly to the Queryable.* call. /// private static string? EmitGenericLambda( - InvocationExpressionSyntax inv, SemanticModel model, - SourceProductionContext spc, string interceptAttr, int idx, + InvocationExpressionSyntax inv, SemanticModel model, SourceProductionContext spc, + string interceptAttr, int line, int col, string fileTag, string methodName, INamedTypeSymbol elemSym, string elemFqn, - IMethodSymbol method, List funcParamIndices, string targetTypeFqn, - ExpressiveGlobalOptions globalOptions) + IMethodSymbol method, List funcParamIndices, string targetTypeFqn) { // ── Extract all lambda expressions from the Func<> argument positions ── var lambdas = new List(funcParamIndices.Count); @@ -583,7 +658,10 @@ private static bool IsAnonymousType(ITypeSymbol type) if (typeAliases.TryGetValue(returnElemType!, out var retParam)) returnRef = retParam; else - returnRef = returnElemType!.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); + // Use ResolveTypeFqn so that composite return types like IGrouping + // are resolved through the type aliases (e.g. IGrouping instead of the + // compiler-generated anonymous type name which is not valid C#). + returnRef = ResolveTypeFqn(returnElemType!, typeAliases); } else { @@ -671,11 +749,11 @@ private static bool IsAnonymousType(ITypeSymbol type) for (int j = 0; j < funcParamIndices.Count; j++) { var lambdaVar = single ? "__lambda" : $"__lambda{j + 1}"; - var prefix = single ? $"i{idx}_" : $"i{idx}{(char)('a' + j)}_"; + var prefix = single ? $"i{fileTag}{line}c{col}_" : $"i{fileTag}{line}c{col}{(char)('a' + j)}_"; var delegateName = single ? "__func" : $"__func{j + 1}"; var funcType = (INamedTypeSymbol)method.Parameters[funcParamIndices[j]].Type; var lambdaElemSym = funcType.TypeArguments[0] as INamedTypeSymbol ?? elemSym; - var emitResult = EmitLambdaBody(lambdas[j], lambdaElemSym, model, spc, globalOptions, + var emitResult = EmitLambdaBody(lambdas[j], lambdaElemSym, model, spc, delegateFqns[j], lambdaVar, varPrefix: prefix, typeAliases: hasAnyAnon ? typeAliases : null, delegateVarName: delegateName); @@ -691,7 +769,7 @@ private static bool IsAnonymousType(ITypeSymbol type) { return $$""" {{interceptAttr}} - internal static global::ExpressiveSharp.IExpressiveQueryable<{{returnRef}}> {{MethodId(methodName, idx)}}( + internal static global::ExpressiveSharp.IExpressiveQueryable<{{returnRef}}> {{MethodId(methodName, fileTag, line, col)}}( this global::ExpressiveSharp.IExpressiveQueryable<{{elemFqn}}> source, {{interceptorParamList}}) { @@ -706,7 +784,7 @@ private static bool IsAnonymousType(ITypeSymbol type) return $$""" {{interceptAttr}} - internal static {{returnRef}} {{MethodId(methodName, idx)}}( + internal static {{returnRef}} {{MethodId(methodName, fileTag, line, col)}}( this global::ExpressiveSharp.IExpressiveQueryable<{{elemFqn}}> source, {{interceptorParamList}}) { @@ -722,7 +800,7 @@ private static bool IsAnonymousType(ITypeSymbol type) { return $$""" {{interceptAttr}} - internal static global::ExpressiveSharp.IExpressiveQueryable<{{returnRef}}> {{MethodId(methodName, idx)}}{{typeParams}}( + internal static global::ExpressiveSharp.IExpressiveQueryable<{{returnRef}}> {{MethodId(methodName, fileTag, line, col)}}{{typeParams}}( this global::ExpressiveSharp.IExpressiveQueryable<{{elemRef}}> source, {{interceptorParamList}}) { @@ -738,7 +816,7 @@ private static bool IsAnonymousType(ITypeSymbol type) return $$""" {{interceptAttr}} - internal static {{returnRef}} {{MethodId(methodName, idx)}}{{typeParams}}( + internal static {{returnRef}} {{MethodId(methodName, fileTag, line, col)}}{{typeParams}}( this global::ExpressiveSharp.IExpressiveQueryable<{{elemRef}}> source, {{interceptorParamList}}) { @@ -816,4 +894,39 @@ private static string ResolveTypeFqn(ITypeSymbol type, Dictionary + /// Compares (CompilationUnitSyntax, Compilation) pairs using REFERENCE + /// equality on the syntax root only, completely ignoring the Compilation. + /// + /// + /// Roslyn's incremental pipeline rebuilds the on every + /// file edit — even for files unrelated to our call sites. However, it keeps every + /// unchanged file's root as the exact same object reference + /// across incremental runs. + /// + /// + /// By using reference equality on the , editing + /// a noise file makes all untouched source-file pairs compare as "equal" → their + /// RegisterSourceOutput actions are skipped entirely → O(1) incremental cost + /// for noise-file edits, matching the pattern used by EntityFrameworkCore.Projectables. + /// + /// + private sealed class CompilationUnitAndCompilationComparer + : IEqualityComparer<(CompilationUnitSyntax Left, Compilation Right)> + { + public readonly static CompilationUnitAndCompilationComparer Instance + = new CompilationUnitAndCompilationComparer(); + + private CompilationUnitAndCompilationComparer() { } + + public bool Equals( + (CompilationUnitSyntax Left, Compilation Right) x, + (CompilationUnitSyntax Left, Compilation Right) y) + => ReferenceEquals(x.Left, y.Left); + + public int GetHashCode((CompilationUnitSyntax Left, Compilation Right) obj) + => System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(obj.Left); + } } 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 9ea82d31..7f9628c5 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AggregateByTests.AggregateBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/AggregateByTests.AggregateBy_GeneratesInterceptor.verified.txt @@ -3,25 +3,25 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_AggregateBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_AggregateBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func1, decimal seed, global::System.Func __func2) { // Source: o => o.Tag - var i0a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0a_expr_0 = global::System.Linq.Expressions.Expression.Property(i0a_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i0a_expr_0, i0a_p_o); + 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")); // o.Tag + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18a_expr_0, i361d10c18a_p_o); // Source: (acc, o) => acc + o.Price - var i0b_p_acc = global::System.Linq.Expressions.Expression.Parameter(typeof(decimal), "acc"); - var i0b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0b_expr_1 = global::System.Linq.Expressions.Expression.Property(i0b_p_o, typeof(global::TestNs.Order).GetProperty("Price")); // o.Price - var i0b_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Add, i0b_p_acc, i0b_expr_1); - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i0b_expr_0, i0b_p_acc, i0b_p_o); + 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")); // 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); 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 827f6e4b..72da5d12 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 @@ -3,29 +3,29 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_AggregateBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_AggregateBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func1, global::System.Func __func2, global::System.Func __func3) { // Source: o => o.Tag - var i0a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0a_expr_0 = global::System.Linq.Expressions.Expression.Property(i0a_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i0a_expr_0, i0a_p_o); + 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")); // o.Tag + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18a_expr_0, i361d10c18a_p_o); // Source: k => 0m - var i0b_p_k = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "k"); - var i0b_expr_0 = global::System.Linq.Expressions.Expression.Constant(0m, typeof(decimal)); // 0m - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i0b_expr_0, i0b_p_k); + 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); // Source: (acc, o) => acc + o.Price - var i0c_p_acc = global::System.Linq.Expressions.Expression.Parameter(typeof(decimal), "acc"); - var i0c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0c_expr_1 = global::System.Linq.Expressions.Expression.Property(i0c_p_o, typeof(global::TestNs.Order).GetProperty("Price")); // o.Price - var i0c_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Add, i0c_p_acc, i0c_expr_1); - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda>(i0c_expr_0, i0c_p_acc, i0c_p_o); + 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")); // 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); 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 0d79ad67..0cef92bc 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 @@ -3,35 +3,35 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_Count_0( + internal static int __Polyfill_Count_361d_11_25( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Total > 0m - var i0_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_x, typeof(T0).GetProperty("Total")); // x.Total - var i0_expr_2 = global::System.Linq.Expressions.Expression.Constant(0m, typeof(decimal)); // 0m - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_x); + 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")); // 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); 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_1( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_25( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Total } - var i1_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i1_expr_1 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Id")); // o.Id - var i1_expr_2 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Total")); // o.Total - var i1_expr_3 = typeof(T1).GetConstructors()[0]; - var i1_expr_0 = global::System.Linq.Expressions.Expression.New(i1_expr_3, new global::System.Linq.Expressions.Expression[] { i1_expr_1, i1_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Total") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i1_expr_0, i1_p_o); + 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")); // o.Id + var i361d10c25_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c25_p_o, typeof(T0).GetProperty("Total")); // 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); 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 189e8c35..6eb39ac3 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Category - var i0_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_x, typeof(T0).GetProperty("Category")); // x.Category - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_x); + 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")); // x.Category + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_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_1( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Category } - var i1_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i1_expr_1 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Id")); // o.Id - var i1_expr_2 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Category")); // o.Category - var i1_expr_3 = typeof(T1).GetConstructors()[0]; - var i1_expr_0 = global::System.Linq.Expressions.Expression.New(i1_expr_3, new global::System.Linq.Expressions.Expression[] { i1_expr_1, i1_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Category") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i1_expr_0, i1_p_o); + 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")); // o.Id + var i361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Category")); // 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); 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 954c9a39..0346403d 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 @@ -3,35 +3,35 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable>> __Polyfill_GroupBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Category - var i0_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_x, typeof(T0).GetProperty("Category")); // x.Category - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_x); - return (global::ExpressiveSharp.IExpressiveQueryable>>)(object) + 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")); // x.Category + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_p_x); + return (global::ExpressiveSharp.IExpressiveQueryable>)(object) global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.GroupBy( (global::System.Linq.IQueryable)(object)source, __lambda)); } [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_1( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Category } - var i1_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i1_expr_1 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Id")); // o.Id - var i1_expr_2 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Category")); // o.Category - var i1_expr_3 = typeof(T1).GetConstructors()[0]; - var i1_expr_0 = global::System.Linq.Expressions.Expression.New(i1_expr_3, new global::System.Linq.Expressions.Expression[] { i1_expr_1, i1_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Category") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i1_expr_0, i1_p_o); + 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")); // o.Id + var i361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Category")); // 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); 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 8a688991..80c4d161 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderByDescending_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderByDescending_361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Name - var i0_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_x, typeof(T0).GetProperty("Name")); // x.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_x); + 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")); // x.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_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_1( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Name } - var i1_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i1_expr_1 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Id")); // o.Id - var i1_expr_2 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Name")); // o.Name - var i1_expr_3 = typeof(T1).GetConstructors()[0]; - var i1_expr_0 = global::System.Linq.Expressions.Expression.New(i1_expr_3, new global::System.Linq.Expressions.Expression[] { i1_expr_1, i1_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Name") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i1_expr_0, i1_p_o); + 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")); // o.Id + var i361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Name")); // 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); 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 0a3bdd5c..cd82583a 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Id - var i0_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_x, typeof(T0).GetProperty("Id")); // x.Id - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_x); + 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")); // x.Id + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_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_1( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Name } - var i1_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i1_expr_1 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Id")); // o.Id - var i1_expr_2 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Name")); // o.Name - var i1_expr_3 = typeof(T1).GetConstructors()[0]; - var i1_expr_0 = global::System.Linq.Expressions.Expression.New(i1_expr_3, new global::System.Linq.Expressions.Expression[] { i1_expr_1, i1_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Name") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i1_expr_0, i1_p_o); + 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")); // o.Id + var i361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Name")); // 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); 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 d8a8283c..03aed038 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 @@ -3,19 +3,19 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: x => x.Total > 100m - var i0_p_x = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "x"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_x, typeof(T0).GetProperty("Total")); // x.Total - var i0_expr_2 = global::System.Linq.Expressions.Expression.Constant(100m, typeof(decimal)); // 100m - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_x); + 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")); // 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); 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_1( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Total } - var i1_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i1_expr_1 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Id")); // o.Id - var i1_expr_2 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(T0).GetProperty("Total")); // o.Total - var i1_expr_3 = typeof(T1).GetConstructors()[0]; - var i1_expr_0 = global::System.Linq.Expressions.Expression.New(i1_expr_3, new global::System.Linq.Expressions.Expression[] { i1_expr_1, i1_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Total") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i1_expr_0, i1_p_o); + 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")); // o.Id + var i361d10c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d10c18_p_o, typeof(T0).GetProperty("Total")); // 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); 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 455bf682..9802ff5d 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 @@ -3,18 +3,18 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func, global::System.Collections.Generic.IEqualityComparer comparer) { // Source: o => o.Tag - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_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 273e7cff..92b12979 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 @@ -3,18 +3,18 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func, global::System.Collections.Generic.IEqualityComparer comparer) { // Source: o => o.Tag - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_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 7917f5a0..6e91a515 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 @@ -3,18 +3,18 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func, global::System.Collections.Generic.IComparer comparer) { // Source: o => o.Tag - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_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 843bc37a..9ab6fa69 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdateAsync_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ExecuteUpdateTests.ExecuteUpdateAsync_GeneratesInterceptor.verified.txt @@ -3,22 +3,22 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Threading.Tasks.Task __Polyfill_ExecuteUpdateAsync_0( + internal static global::System.Threading.Tasks.Task __Polyfill_ExecuteUpdateAsync_361d_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 i0_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); + var i361d58c24_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); var p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag - var i0_expr_2 = global::System.Linq.Expressions.Expression.Property(p_o_1, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var i0_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_2, p_o_1); - var i0_expr_4 = global::System.Linq.Expressions.Expression.Constant("updated", typeof(string)); // "updated" - var i0_expr_0 = global::System.Linq.Expressions.Expression.Call(i0_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[] { i0_expr_3, i0_expr_4 }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(i0_expr_0, i0_p_s); + var i361d58c24_expr_2 = global::System.Linq.Expressions.Expression.Property(p_o_1, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag + var i361d58c24_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i361d58c24_expr_2, 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); 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 698d2895..7e54c4d2 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 @@ -3,21 +3,21 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_ExecuteUpdate_0( + internal static int __Polyfill_ExecuteUpdate_361d_58_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func, global::TestNs.SetPropertyCalls> __func) { // Source: s => s.SetProperty(o => o.Tag, "updated") - var i0_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); + var i361d58c18_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); var p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag - var i0_expr_2 = global::System.Linq.Expressions.Expression.Property(p_o_1, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var i0_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_2, p_o_1); - var i0_expr_4 = global::System.Linq.Expressions.Expression.Constant("updated", typeof(string)); // "updated" - var i0_expr_0 = global::System.Linq.Expressions.Expression.Call(i0_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[] { i0_expr_3, i0_expr_4 }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(i0_expr_0, i0_p_s); + var i361d58c18_expr_2 = global::System.Linq.Expressions.Expression.Property(p_o_1, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag + var i361d58c18_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i361d58c18_expr_2, 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); 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 a51e26ff..c35a09ff 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 @@ -3,30 +3,30 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_ExecuteUpdate_0( + internal static int __Polyfill_ExecuteUpdate_361d_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 i0_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); + var i361d63c18_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); var p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag - var i0_expr_2 = global::System.Linq.Expressions.Expression.Property(p_o_1, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var i0_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_2, p_o_1); + var i361d63c18_expr_2 = global::System.Linq.Expressions.Expression.Property(p_o_1, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag + var i361d63c18_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i361d63c18_expr_2, p_o_1); var p_o_4 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Customer?.Name ?? "none" - var i0_expr_6 = global::System.Linq.Expressions.Expression.Property(p_o_4, typeof(global::TestNs.Order).GetProperty("Customer")); // o.Customer - var i0_expr_7 = global::System.Linq.Expressions.Expression.Property(i0_expr_6, typeof(global::TestNs.Customer).GetProperty("Name")); // .Name - var i0_expr_9 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); - var i0_expr_10 = global::System.Linq.Expressions.Expression.NotEqual(i0_expr_6, i0_expr_9); - var i0_expr_11 = global::System.Linq.Expressions.Expression.Default(typeof(string)); - var i0_expr_8 = global::System.Linq.Expressions.Expression.Condition(i0_expr_10, i0_expr_7, i0_expr_11, typeof(string)); - var i0_expr_12 = global::System.Linq.Expressions.Expression.Constant("none", typeof(string)); // "none" - var i0_expr_5 = global::System.Linq.Expressions.Expression.Coalesce(i0_expr_8, i0_expr_12); - var i0_expr_13 = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_5, p_o_4); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Call(i0_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[] { i0_expr_3, i0_expr_13 }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(i0_expr_0, i0_p_s); + var i361d63c18_expr_6 = global::System.Linq.Expressions.Expression.Property(p_o_4, typeof(global::TestNs.Order).GetProperty("Customer")); // o.Customer + var i361d63c18_expr_7 = global::System.Linq.Expressions.Expression.Property(i361d63c18_expr_6, typeof(global::TestNs.Customer).GetProperty("Name")); // .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, 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); 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 137849a7..86cb1247 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 @@ -3,32 +3,32 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_ExecuteUpdate_0( + internal static int __Polyfill_ExecuteUpdate_361d_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 i0_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); + var i361d62c18_p_s = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.SetPropertyCalls), "s"); var p_o_1 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Tag - var i0_expr_2 = global::System.Linq.Expressions.Expression.Property(p_o_1, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var i0_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_2, p_o_1); + var i361d62c18_expr_2 = global::System.Linq.Expressions.Expression.Property(p_o_1, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag + var i361d62c18_expr_3 = global::System.Linq.Expressions.Expression.Lambda>(i361d62c18_expr_2, p_o_1); var p_o_4 = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); // o => o.Amount switch { ... - var i0_expr_5 = global::System.Linq.Expressions.Expression.Property(p_o_4, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var i0_expr_6 = global::System.Linq.Expressions.Expression.Constant("low", typeof(string)); // "low" - var i0_expr_8 = global::System.Linq.Expressions.Expression.Constant(50, typeof(int)); // 50 - var i0_expr_7 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i0_expr_5, i0_expr_8); - var i0_expr_9 = global::System.Linq.Expressions.Expression.Constant("medium", typeof(string)); // "medium" - var i0_expr_10 = global::System.Linq.Expressions.Expression.Condition(i0_expr_7, i0_expr_9, i0_expr_6, typeof(string)); - var i0_expr_12 = global::System.Linq.Expressions.Expression.Constant(100, typeof(int)); // 100 - var i0_expr_11 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i0_expr_5, i0_expr_12); - var i0_expr_13 = global::System.Linq.Expressions.Expression.Constant("high", typeof(string)); // "high" - var i0_expr_14 = global::System.Linq.Expressions.Expression.Condition(i0_expr_11, i0_expr_13, i0_expr_10, typeof(string)); - var i0_expr_15 = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_14, p_o_4); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Call(i0_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[] { i0_expr_3, i0_expr_15 }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda, global::TestNs.SetPropertyCalls>>(i0_expr_0, i0_p_s); + var i361d62c18_expr_5 = global::System.Linq.Expressions.Expression.Property(p_o_4, typeof(global::TestNs.Order).GetProperty("Amount")); // 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, 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); return global::TestNs.MockRelationalExtensions.ExecuteUpdate( (global::System.Linq.IQueryable)source, __lambda); 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 f12f9667..12da718b 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 @@ -3,22 +3,22 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_0( + internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_361d_9_68( global::System.Func __func) { // Source: o => o.Tag?.Length - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_expr_0, typeof(string).GetProperty("Length")); // .Length - var i0_expr_2 = global::System.Linq.Expressions.Expression.Convert(i0_expr_1, typeof(int?)); - var i0_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(string)); - var i0_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(i0_expr_0, i0_expr_4); - var i0_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(int?)); - var i0_expr_3 = global::System.Linq.Expressions.Expression.Condition(i0_expr_5, i0_expr_2, i0_expr_6, typeof(int?)); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_3, i0_p_o); + 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")); // o.Tag + var i361d9c68_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c68_expr_0, typeof(string).GetProperty("Length")); // .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); 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 6efbf965..ed6c8195 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 @@ -3,24 +3,24 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Customer?.Name == "Alice" - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Customer")); // o.Customer - var i0_expr_2 = global::System.Linq.Expressions.Expression.Property(i0_expr_1, typeof(global::TestNs.Customer).GetProperty("Name")); // .Name - var i0_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); - var i0_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(i0_expr_1, i0_expr_4); - var i0_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(string)); - var i0_expr_3 = global::System.Linq.Expressions.Expression.Condition(i0_expr_5, i0_expr_2, i0_expr_6, typeof(string)); - var i0_expr_7 = global::System.Linq.Expressions.Expression.Constant("Alice", typeof(string)); // "Alice" - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i0_expr_3, i0_expr_7); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Customer + var i361d11c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d11c18_expr_1, typeof(global::TestNs.Customer).GetProperty("Name")); // .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); 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 6efbf965..ed6c8195 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Where_PerCallOverridesGlobal.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GlobalOptionsTests.Where_PerCallOverridesGlobal.verified.txt @@ -3,24 +3,24 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Customer?.Name == "Alice" - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Customer")); // o.Customer - var i0_expr_2 = global::System.Linq.Expressions.Expression.Property(i0_expr_1, typeof(global::TestNs.Customer).GetProperty("Name")); // .Name - var i0_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); - var i0_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(i0_expr_1, i0_expr_4); - var i0_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(string)); - var i0_expr_3 = global::System.Linq.Expressions.Expression.Condition(i0_expr_5, i0_expr_2, i0_expr_6, typeof(string)); - var i0_expr_7 = global::System.Linq.Expressions.Expression.Constant("Alice", typeof(string)); // "Alice" - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i0_expr_3, i0_expr_7); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Customer + var i361d11c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d11c18_expr_1, typeof(global::TestNs.Customer).GetProperty("Name")); // .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); 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 52869ebc..24f8417f 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_GeneratesGroupingReturnType.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/GroupByTests.GroupBy_GeneratesGroupingReturnType.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_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 2a0d88b1..7d3e7b08 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 @@ -3,27 +3,27 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupBy_361d_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 i0a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0a_expr_0 = global::System.Linq.Expressions.Expression.Property(i0a_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i0a_expr_0, i0a_p_o); + 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")); // o.Tag + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18a_expr_0, i361d10c18a_p_o); // Source: o => o.Name - var i0b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0b_expr_0 = global::System.Linq.Expressions.Expression.Property(i0b_p_o, typeof(global::TestNs.Order).GetProperty("Name")); // o.Name - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i0b_expr_0, i0b_p_o); + 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")); // o.Name + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18b_expr_0, i361d10c18b_p_o); // Source: (key, names) => key - var i0c_p_key = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "key"); - var i0c_p_names = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "names"); - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda, string>>(i0c_p_key, i0c_p_key, i0c_p_names); + 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); 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 03f29ceb..9b679f94 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 @@ -3,22 +3,22 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_GroupBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func1, global::System.Func __func2) { // Source: o => o.Tag - var i0a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0a_expr_0 = global::System.Linq.Expressions.Expression.Property(i0a_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i0a_expr_0, i0a_p_o); + 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")); // o.Tag + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18a_expr_0, i361d10c18a_p_o); // Source: o => o.Name - var i0b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0b_expr_0 = global::System.Linq.Expressions.Expression.Property(i0b_p_o, typeof(global::TestNs.Order).GetProperty("Name")); // o.Name - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i0b_expr_0, i0b_p_o); + 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")); // o.Name + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18b_expr_0, i361d10c18b_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 4dcdee17..2ede44ea 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 @@ -3,22 +3,22 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func1, global::System.Func, string> __func2) { // Source: o => o.Tag - var i0a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0a_expr_0 = global::System.Linq.Expressions.Expression.Property(i0a_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i0a_expr_0, i0a_p_o); + 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")); // o.Tag + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18a_expr_0, i361d10c18a_p_o); // Source: (key, orders) => key - var i0b_p_key = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "key"); - var i0b_p_orders = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "orders"); - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda, string>>(i0b_p_key, i0b_p_key, i0b_p_orders); + 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); 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 62a16801..edf8ede7 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 @@ -3,10 +3,10 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupJoin_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupJoin_361d_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 i0a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i0a_expr_0 = global::System.Linq.Expressions.Expression.Property(i0a_p_o, typeof(T0).GetProperty("CustomerId")); // o.CustomerId - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i0a_expr_0, i0a_p_o); + 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")); // o.CustomerId + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19a_expr_0, i361d11c19a_p_o); // Source: c => c.Id - var i0b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(T1), "c"); - var i0b_expr_0 = global::System.Linq.Expressions.Expression.Property(i0b_p_c, typeof(T1).GetProperty("Id")); // c.Id - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i0b_expr_0, i0b_p_c); + 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")); // c.Id + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19b_expr_0, i361d11c19b_p_c); // Source: (o, cs) => new { o.CustomerId, Count = cs.Count() } - var i0c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i0c_p_cs = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "cs"); - var i0c_expr_1 = global::System.Linq.Expressions.Expression.Property(i0c_p_o, typeof(T0).GetProperty("CustomerId")); // o.CustomerId - var i0c_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[] { i0c_p_cs }); // cs.Count() - var i0c_expr_3 = typeof(T3).GetConstructors()[0]; - var i0c_expr_0 = global::System.Linq.Expressions.Expression.New(i0c_expr_3, new global::System.Linq.Expressions.Expression[] { i0c_expr_1, i0c_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T3).GetProperty("CustomerId"), typeof(T3).GetProperty("Count") }); - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda, T3>>(i0c_expr_0, i0c_p_o, i0c_p_cs); + 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")); // 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); 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 6ad1948e..10ad302f 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.GroupJoin_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.GroupJoin_GeneratesInterceptor.verified.txt @@ -3,10 +3,10 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupJoin_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_GroupJoin_361d_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 i0a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0a_expr_0 = global::System.Linq.Expressions.Expression.Property(i0a_p_o, typeof(global::TestNs.Order).GetProperty("CustomerId")); // o.CustomerId - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i0a_expr_0, i0a_p_o); + 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")); // o.CustomerId + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19a_expr_0, i361d11c19a_p_o); // Source: c => c.Id - var i0b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Customer), "c"); - var i0b_expr_0 = global::System.Linq.Expressions.Expression.Property(i0b_p_c, typeof(global::TestNs.Customer).GetProperty("Id")); // c.Id - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i0b_expr_0, i0b_p_c); + 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")); // c.Id + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19b_expr_0, i361d11c19b_p_c); // Source: (o, cs) => o.CustomerId - var i0c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0c_p_cs = global::System.Linq.Expressions.Expression.Parameter(typeof(global::System.Collections.Generic.IEnumerable), "cs"); - var i0c_expr_0 = global::System.Linq.Expressions.Expression.Property(i0c_p_o, typeof(global::TestNs.Order).GetProperty("CustomerId")); // o.CustomerId - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda, int>>(i0c_expr_0, i0c_p_o, i0c_p_cs); + 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")); // o.CustomerId + var __lambda3 = global::System.Linq.Expressions.Expression.Lambda, int>>(i361d11c19c_expr_0, i361d11c19c_p_o, i361d11c19c_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 d827e66d..f04b8dd9 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 @@ -3,10 +3,10 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Join_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Join_361d_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 i0a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i0a_expr_0 = global::System.Linq.Expressions.Expression.Property(i0a_p_o, typeof(T0).GetProperty("CustomerId")); // o.CustomerId - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i0a_expr_0, i0a_p_o); + 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")); // o.CustomerId + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19a_expr_0, i361d11c19a_p_o); // Source: c => c.Id - var i0b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(T1), "c"); - var i0b_expr_0 = global::System.Linq.Expressions.Expression.Property(i0b_p_c, typeof(T1).GetProperty("Id")); // c.Id - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i0b_expr_0, i0b_p_c); + 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")); // c.Id + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19b_expr_0, i361d11c19b_p_c); // Source: (o, c) => new { o.Product, CustomerName = c.Name } - var i0c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i0c_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(T1), "c"); - var i0c_expr_1 = global::System.Linq.Expressions.Expression.Property(i0c_p_o, typeof(T0).GetProperty("Product")); // o.Product - var i0c_expr_2 = global::System.Linq.Expressions.Expression.Property(i0c_p_c, typeof(T1).GetProperty("Name")); // c.Name - var i0c_expr_3 = typeof(T3).GetConstructors()[0]; - var i0c_expr_0 = global::System.Linq.Expressions.Expression.New(i0c_expr_3, new global::System.Linq.Expressions.Expression[] { i0c_expr_1, i0c_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T3).GetProperty("Product"), typeof(T3).GetProperty("CustomerName") }); - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda>(i0c_expr_0, i0c_p_o, i0c_p_c); + 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")); // o.Product + var i361d11c19c_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d11c19c_p_c, typeof(T1).GetProperty("Name")); // 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); 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 d5fa28ae..2ca2e31e 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.Join_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/JoinTests.Join_GeneratesInterceptor.verified.txt @@ -3,10 +3,10 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Join_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Join_361d_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 i0a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0a_expr_0 = global::System.Linq.Expressions.Expression.Property(i0a_p_o, typeof(global::TestNs.Order).GetProperty("CustomerId")); // o.CustomerId - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i0a_expr_0, i0a_p_o); + 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")); // o.CustomerId + var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19a_expr_0, i361d11c19a_p_o); // Source: c => c.Id - var i0b_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Customer), "c"); - var i0b_expr_0 = global::System.Linq.Expressions.Expression.Property(i0b_p_c, typeof(global::TestNs.Customer).GetProperty("Id")); // c.Id - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i0b_expr_0, i0b_p_c); + 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")); // c.Id + var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19b_expr_0, i361d11c19b_p_c); // Source: (o, c) => o.Product + " - " + c.Name - var i0c_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0c_p_c = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Customer), "c"); - var i0c_expr_2 = global::System.Linq.Expressions.Expression.Property(i0c_p_o, typeof(global::TestNs.Order).GetProperty("Product")); // o.Product - var i0c_expr_3 = global::System.Linq.Expressions.Expression.Constant(" - ", typeof(string)); // " - " - var i0c_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), i0c_expr_2, i0c_expr_3); - var i0c_expr_4 = global::System.Linq.Expressions.Expression.Property(i0c_p_c, typeof(global::TestNs.Customer).GetProperty("Name")); // c.Name - var i0c_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), i0c_expr_1, i0c_expr_4); - var __lambda3 = global::System.Linq.Expressions.Expression.Lambda>(i0c_expr_0, i0c_p_o, i0c_p_c); + 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")); // 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")); // 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); 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 6efbf965..ed6c8195 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/NullConditionalTests.NullConditionalRewrite_ExpandsInWhereBody.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/NullConditionalTests.NullConditionalRewrite_ExpandsInWhereBody.verified.txt @@ -3,24 +3,24 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Customer?.Name == "Alice" - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Customer")); // o.Customer - var i0_expr_2 = global::System.Linq.Expressions.Expression.Property(i0_expr_1, typeof(global::TestNs.Customer).GetProperty("Name")); // .Name - var i0_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(global::TestNs.Customer)); - var i0_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(i0_expr_1, i0_expr_4); - var i0_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(string)); - var i0_expr_3 = global::System.Linq.Expressions.Expression.Condition(i0_expr_5, i0_expr_2, i0_expr_6, typeof(string)); - var i0_expr_7 = global::System.Linq.Expressions.Expression.Constant("Alice", typeof(string)); // "Alice" - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i0_expr_3, i0_expr_7); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Customer + var i361d11c18_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d11c18_expr_1, typeof(global::TestNs.Customer).GetProperty("Name")); // .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); 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 602fe21b..af45e220 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.OrderBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.OrderBy_GeneratesInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Priority - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Priority")); // o.Priority - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Priority + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_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 ad98e1f3..6c536110 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.ThenBy_CastsToIOrderedQueryable.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.ThenBy_CastsToIOrderedQueryable.verified.txt @@ -3,31 +3,31 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ThenBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ThenBy_361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Name - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Name")); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_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_1( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Priority - var i1_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i1_expr_0 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(global::TestNs.Order).GetProperty("Priority")); // o.Priority - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i1_expr_0, i1_p_o); + 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")); // o.Priority + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_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.cs b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.cs index cc37c646..27f01543 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.cs +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/OrderByTests.cs @@ -1,3 +1,4 @@ +using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using VerifyMSTest; using ExpressiveSharp.Generator.Tests.Infrastructure; 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 bede1fea..9bcc18f7 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTargetTests.PolyfillTarget_RoutesToSpecifiedType.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/PolyfillTargetTests.PolyfillTarget_RoutesToSpecifiedType.verified.txt @@ -3,18 +3,18 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Threading.Tasks.Task __Polyfill_AnyAsync_0( + internal static global::System.Threading.Tasks.Task __Polyfill_AnyAsync_361d_33_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func, global::System.Threading.CancellationToken cancellationToken) { // Source: o => o.Active - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Active")); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d33c46_expr_0, i361d33c46_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 24faac08..21aa31a6 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static bool __Polyfill_Any_0( + internal static bool __Polyfill_Any_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Active")); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 8946c09f..ef5dc1c8 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 @@ -3,18 +3,18 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_0( + internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_361d_9_42( global::System.Func __func) { // Source: (Order o) => o.Price > threshold - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Price")); // o.Price - var i0_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 i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // 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); 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 c1148622..eb73bbe4 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 @@ -3,18 +3,18 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_0( + internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_361d_9_42( global::System.Func __func) { // Source: (Order o) => o.Tag == "urgent" - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var i0_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // 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); 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 f12f9667..12da718b 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 @@ -3,22 +3,22 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_0( + internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_361d_9_68( global::System.Func __func) { // Source: o => o.Tag?.Length - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_expr_0, typeof(string).GetProperty("Length")); // .Length - var i0_expr_2 = global::System.Linq.Expressions.Expression.Convert(i0_expr_1, typeof(int?)); - var i0_expr_4 = global::System.Linq.Expressions.Expression.Constant(null, typeof(string)); - var i0_expr_5 = global::System.Linq.Expressions.Expression.NotEqual(i0_expr_0, i0_expr_4); - var i0_expr_6 = global::System.Linq.Expressions.Expression.Default(typeof(int?)); - var i0_expr_3 = global::System.Linq.Expressions.Expression.Condition(i0_expr_5, i0_expr_2, i0_expr_6, typeof(int?)); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_3, i0_p_o); + 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")); // o.Tag + var i361d9c68_expr_1 = global::System.Linq.Expressions.Expression.Property(i361d9c68_expr_0, typeof(string).GetProperty("Length")); // .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); 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 d13187e4..060246d8 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 @@ -3,18 +3,18 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_0( + internal static global::System.Linq.Expressions.Expression> __Polyfill_Create_361d_9_68( global::System.Func __func) { // Source: o => o.Tag == "urgent" - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var i0_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // 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); 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 ec929d45..9efe9569 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.All_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.All_GeneratesScalarInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static bool __Polyfill_All_0( + internal static bool __Polyfill_All_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Active")); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 205196b2..0a219fed 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Any_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Any_GeneratesScalarInterceptor.verified.txt @@ -3,19 +3,19 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static bool __Polyfill_Any_0( + internal static bool __Polyfill_Any_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag == "urgent" - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var i0_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // 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); 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 a106fc3a..29d63ede 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static decimal __Polyfill_Average_0( + internal static decimal __Polyfill_Average_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 3304f9b0..ae1a88b4 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double __Polyfill_Average_0( + internal static double __Polyfill_Average_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 f16ce6f5..680d866e 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static float __Polyfill_Average_0( + internal static float __Polyfill_Average_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 1008fd5c..79ec09b0 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double __Polyfill_Average_0( + internal static double __Polyfill_Average_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 292653f1..457a7fd4 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double __Polyfill_Average_0( + internal static double __Polyfill_Average_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 3cebb03d..06d23792 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static decimal? __Polyfill_Average_0( + internal static decimal? __Polyfill_Average_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 2181865a..9f3bb268 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double? __Polyfill_Average_0( + internal static double? __Polyfill_Average_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 70c7dd68..bb78e4b4 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static float? __Polyfill_Average_0( + internal static float? __Polyfill_Average_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 4e35f064..3ee0d069 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double? __Polyfill_Average_0( + internal static double? __Polyfill_Average_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 4cc56946..814b23b4 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double? __Polyfill_Average_0( + internal static double? __Polyfill_Average_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 beac5b4e..d1805a0b 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Count_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Count_GeneratesScalarInterceptor.verified.txt @@ -3,19 +3,19 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_Count_0( + internal static int __Polyfill_Count_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount > 100 - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var i0_expr_2 = global::System.Linq.Expressions.Expression.Constant(100, typeof(int)); // 100 - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // 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); 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 38aeff5c..befb4fb4 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.FirstOrDefault_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.FirstOrDefault_GeneratesScalarInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_FirstOrDefault_0( + internal static global::TestNs.Order __Polyfill_FirstOrDefault_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Active")); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 0a02d171..d3358d20 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.First_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.First_GeneratesScalarInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_First_0( + internal static global::TestNs.Order __Polyfill_First_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Active")); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 63cc3079..a91081ff 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LastOrDefault_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LastOrDefault_GeneratesScalarInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_LastOrDefault_0( + internal static global::TestNs.Order __Polyfill_LastOrDefault_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Active")); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 9cfa2a45..313b5468 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Last_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Last_GeneratesScalarInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_Last_0( + internal static global::TestNs.Order __Polyfill_Last_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Active")); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 05440554..576d6e0a 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LongCount_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.LongCount_GeneratesScalarInterceptor.verified.txt @@ -3,19 +3,19 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static long __Polyfill_LongCount_0( + internal static long __Polyfill_LongCount_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount > 100 - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var i0_expr_2 = global::System.Linq.Expressions.Expression.Constant(100, typeof(int)); // 100 - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // 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); 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 5555a5f7..370d80e3 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MaxBy_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MaxBy_GeneratesScalarInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_MaxBy_0( + internal static global::TestNs.Order __Polyfill_MaxBy_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 f588cb59..1ad034d3 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static string __Polyfill_Max_0( + internal static string __Polyfill_Max_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Name - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Name")); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 a9994fe1..dfd30882 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MinBy_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.MinBy_GeneratesScalarInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_MinBy_0( + internal static global::TestNs.Order __Polyfill_MinBy_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 54a46d04..3e5b3196 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static string __Polyfill_Min_0( + internal static string __Polyfill_Min_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Name - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Name")); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 49c88569..c7eb7b14 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.SingleOrDefault_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.SingleOrDefault_GeneratesScalarInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_SingleOrDefault_0( + internal static global::TestNs.Order __Polyfill_SingleOrDefault_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Active")); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 084bed49..81526ab0 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Single_GeneratesScalarInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/ScalarMethodTests.Single_GeneratesScalarInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::TestNs.Order __Polyfill_Single_0( + internal static global::TestNs.Order __Polyfill_Single_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Active")); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 6a4afe4a..d9e2aa0d 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static decimal __Polyfill_Sum_0( + internal static decimal __Polyfill_Sum_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 75a0c77f..4198480b 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double __Polyfill_Sum_0( + internal static double __Polyfill_Sum_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 7bdf0498..5b4681c8 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static float __Polyfill_Sum_0( + internal static float __Polyfill_Sum_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 ab1d771c..ed7d5ff4 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int __Polyfill_Sum_0( + internal static int __Polyfill_Sum_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 e1322b22..3aab6bdc 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static long __Polyfill_Sum_0( + internal static long __Polyfill_Sum_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 884df575..963966d1 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static decimal? __Polyfill_Sum_0( + internal static decimal? __Polyfill_Sum_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 b8f9ac84..789d63ae 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static double? __Polyfill_Sum_0( + internal static double? __Polyfill_Sum_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 1f003e49..06796e6c 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static float? __Polyfill_Sum_0( + internal static float? __Polyfill_Sum_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 1fd2186f..de3e347d 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static int? __Polyfill_Sum_0( + internal static int? __Polyfill_Sum_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 aec8df1e..11676fd0 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static long? __Polyfill_Sum_0( + internal static long? __Polyfill_Sum_361d_9_46( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c46_expr_0, i361d9c46_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 aae24fa2..fa7dd809 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 @@ -3,18 +3,18 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SelectMany_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SelectMany_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func> __func) { // Source: o => o.Tags - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tags")); // o.Tags - var i0_expr_1 = global::System.Linq.Expressions.Expression.Convert(i0_expr_0, typeof(global::System.Collections.Generic.IEnumerable)); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>>(i0_expr_1, i0_p_o); + 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")); // 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); 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 f963419d..5aba2306 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 @@ -3,27 +3,27 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SelectMany_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SelectMany_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func> __func1, global::System.Func __func2) { // Source: o => o.Tags - var i0a_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0a_expr_0 = global::System.Linq.Expressions.Expression.Property(i0a_p_o, typeof(global::TestNs.Order).GetProperty("Tags")); // o.Tags - var i0a_expr_1 = global::System.Linq.Expressions.Expression.Convert(i0a_expr_0, typeof(global::System.Collections.Generic.IEnumerable)); - var __lambda1 = global::System.Linq.Expressions.Expression.Lambda>>(i0a_expr_1, i0a_p_o); + 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")); // 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); // Source: (o, t) => o.Name + ": " + t - var i0b_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0b_p_t = global::System.Linq.Expressions.Expression.Parameter(typeof(string), "t"); - var i0b_expr_2 = global::System.Linq.Expressions.Expression.Property(i0b_p_o, typeof(global::TestNs.Order).GetProperty("Name")); // o.Name - var i0b_expr_3 = global::System.Linq.Expressions.Expression.Constant(": ", typeof(string)); // ": " - var i0b_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), i0b_expr_2, i0b_expr_3); - var i0b_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), i0b_expr_1, i0b_p_t); - var __lambda2 = global::System.Linq.Expressions.Expression.Lambda>(i0b_expr_0, i0b_p_o, i0b_p_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")); // 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); 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 121af238..6afa4e20 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 @@ -3,20 +3,20 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, o.Name } - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(T0).GetProperty("Id")); // o.Id - var i0_expr_2 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(T0).GetProperty("Name")); // o.Name - var i0_expr_3 = typeof(T1).GetConstructors()[0]; - var i0_expr_0 = global::System.Linq.Expressions.Expression.New(i0_expr_3, new global::System.Linq.Expressions.Expression[] { i0_expr_1, i0_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Name") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Id + var i361d9c33_expr_2 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(T0).GetProperty("Name")); // 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); 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 c6ceb3d6..fa846b38 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 @@ -3,23 +3,23 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => new { o.Id, Total = o.Price * o.Qty } - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(T0), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(T0).GetProperty("Id")); // o.Id - var i0_expr_3 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(T0).GetProperty("Price")); // o.Price - var i0_expr_5 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(T0).GetProperty("Qty")); // o.Qty - var i0_expr_4 = global::System.Linq.Expressions.Expression.Convert(i0_expr_5, typeof(decimal)); - var i0_expr_2 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Multiply, i0_expr_3, i0_expr_4); - var i0_expr_6 = typeof(T1).GetConstructors()[0]; - var i0_expr_0 = global::System.Linq.Expressions.Expression.New(i0_expr_6, new global::System.Linq.Expressions.Expression[] { i0_expr_1, i0_expr_2 }, new global::System.Reflection.MemberInfo[] { typeof(T1).GetProperty("Id"), typeof(T1).GetProperty("Total") }); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Id + var i361d9c33_expr_3 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(T0).GetProperty("Price")); // o.Price + var i361d9c33_expr_5 = global::System.Linq.Expressions.Expression.Property(i361d9c33_p_o, typeof(T0).GetProperty("Qty")); // 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); 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 6f8f4a76..be2bc8cd 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 @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Name - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Name")); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_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 62df2e71..b985be71 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.ExceptBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.ExceptBy_GeneratesInterceptor.verified.txt @@ -3,18 +3,18 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ExceptBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ExceptBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable second, global::System.Func __func) { // Source: o => o.Tag - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_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 012dae9d..c1fdc5e3 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.IntersectBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.IntersectBy_GeneratesInterceptor.verified.txt @@ -3,18 +3,18 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_IntersectBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_IntersectBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable second, global::System.Func __func) { // Source: o => o.Tag - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_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 04010e48..9587615e 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.UnionBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SetOperationTests.UnionBy_GeneratesInterceptor.verified.txt @@ -3,18 +3,18 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_UnionBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_UnionBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable second, global::System.Func __func) { // Source: o => o.Tag - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_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 c708a645..e3c97cbc 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.CountBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.CountBy_GeneratesInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_CountBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable> __Polyfill_CountBy_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_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 03b50ef1..600ff767 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.DistinctBy_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.DistinctBy_GeneratesInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_DistinctBy_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_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 af7a598f..0db57677 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.OrderByDescending_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.OrderByDescending_GeneratesInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderByDescending_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderByDescending_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_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 1c91d09e..3b1fea4c 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.SkipWhile_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.SkipWhile_GeneratesInterceptor.verified.txt @@ -3,19 +3,19 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SkipWhile_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_SkipWhile_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount < 50 - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var i0_expr_2 = global::System.Linq.Expressions.Expression.Constant(50, typeof(int)); // 50 - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.LessThan, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // 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); 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 b6fc5368..99c4cf5c 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.TakeWhile_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.TakeWhile_GeneratesInterceptor.verified.txt @@ -3,17 +3,17 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_TakeWhile_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_TakeWhile_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Active - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Active")); // o.Active - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Active + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d9c33_expr_0, i361d9c33_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 dca0cebb..ab30d1da 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.ThenByDescending_GeneratesInterceptor.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.ThenByDescending_GeneratesInterceptor.verified.txt @@ -3,31 +3,31 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ThenByDescending_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_ThenByDescending_361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Tag + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_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_1( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_OrderBy_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Amount - var i1_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i1_expr_0 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(global::TestNs.Order).GetProperty("Amount")); // o.Amount - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i1_expr_0, i1_p_o); + 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")); // o.Amount + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d10c18_expr_0, i361d10c18_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/SingleLambdaQueryableTests.cs b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.cs index 5330c320..b71d77d5 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.cs +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/SingleLambdaQueryableTests.cs @@ -1,3 +1,4 @@ +using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using VerifyMSTest; using ExpressiveSharp.Generator.Tests.Infrastructure; 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 e496169c..c542e23f 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.ChainedWhereAndSelect_GeneratesTwoInterceptors.verified.txt +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.ChainedWhereAndSelect_GeneratesTwoInterceptors.verified.txt @@ -3,33 +3,33 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Select_361d_11_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Name - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Name")); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c18_expr_0, i361d11c18_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_1( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_10_18( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag == "urgent" - var i1_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i1_expr_1 = global::System.Linq.Expressions.Expression.Property(i1_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var i1_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" - var i1_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i1_expr_1, i1_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i1_expr_0, i1_p_o); + 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")); // 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); 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 d337cca7..20c841cc 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 @@ -3,19 +3,19 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_11_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Price > _minPrice - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Price")); // o.Price - var i0_expr_2 = __ClosureHelper.ResolveCapturedInstanceMember(__func, typeof(global::TestNs.TestClass), "_minPrice"); // _minPrice - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // 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); 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 d4f3a43b..b3e7c1db 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 @@ -3,19 +3,19 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Price > minPrice - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Price")); // o.Price - var i0_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 i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.GreaterThan, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // 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); 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 98a4f402..c4149116 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 @@ -3,19 +3,19 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Where_361d_9_33( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Func __func) { // Source: o => o.Tag == "urgent" - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_expr_1 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Tag")); // o.Tag - var i0_expr_2 = global::System.Linq.Expressions.Expression.Constant("urgent", typeof(string)); // "urgent" - var i0_expr_0 = global::System.Linq.Expressions.Expression.MakeBinary(global::System.Linq.Expressions.ExpressionType.Equal, i0_expr_1, i0_expr_2); - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o); + 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")); // 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); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Where( (global::System.Linq.IQueryable)source, diff --git a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.cs b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.cs index 8c2710e5..def4c380 100644 --- a/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.cs +++ b/tests/ExpressiveSharp.Generator.Tests/PolyfillInterceptorGenerator/WhereTests.cs @@ -1,3 +1,4 @@ +using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using VerifyMSTest; using ExpressiveSharp.Generator.Tests.Infrastructure; 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 c861b78e..4d3cf673 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 @@ -3,19 +3,19 @@ namespace ExpressiveSharp.Generated.Interceptors { - internal static class PolyfillInterceptors + internal static partial class PolyfillInterceptors { [global::System.Runtime.CompilerServices.InterceptsLocationAttribute(/* scrubbed */)] - internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Zip_0( + internal static global::ExpressiveSharp.IExpressiveQueryable __Polyfill_Zip_361d_11_19( this global::ExpressiveSharp.IExpressiveQueryable source, global::System.Collections.Generic.IEnumerable second, global::System.Func __func) { // Source: (o, p) => o.Name - var i0_p_o = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Order), "o"); - var i0_p_p = global::System.Linq.Expressions.Expression.Parameter(typeof(global::TestNs.Price), "p"); - var i0_expr_0 = global::System.Linq.Expressions.Expression.Property(i0_p_o, typeof(global::TestNs.Order).GetProperty("Name")); // o.Name - var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i0_expr_0, i0_p_o, i0_p_p); + 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")); // o.Name + var __lambda = global::System.Linq.Expressions.Expression.Lambda>(i361d11c19_expr_0, i361d11c19_p_o, i361d11c19_p_p); return global::ExpressiveSharp.ExpressiveQueryableExtensions.AsExpressive( global::System.Linq.Queryable.Zip( (global::System.Linq.IQueryable)source,