From f0c5a21592855840ea2ffadf290fa361e5176fcb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 09:59:19 +0000 Subject: [PATCH 1/6] Initial plan From 63977ca23c0c7e23dda63f5c2ec64f4e648bb808 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 10:15:11 +0000 Subject: [PATCH 2/6] Add parameter types to generated class names for overload support Co-authored-by: PhenX <42170+PhenX@users.noreply.github.com> --- .../ProjectableDescriptor.cs | 2 + .../ProjectableInterpreter.cs | 15 +++- .../ProjectionExpressionGenerator.cs | 2 +- .../ProjectionExpressionClassNameGenerator.cs | 43 ++++++++- .../Services/ProjectionExpressionResolver.cs | 87 ++++++++++++++++++- 5 files changed, 142 insertions(+), 7 deletions(-) diff --git a/src/EntityFrameworkCore.Projectables.Generator/ProjectableDescriptor.cs b/src/EntityFrameworkCore.Projectables.Generator/ProjectableDescriptor.cs index f428a76..291cb5b 100644 --- a/src/EntityFrameworkCore.Projectables.Generator/ProjectableDescriptor.cs +++ b/src/EntityFrameworkCore.Projectables.Generator/ProjectableDescriptor.cs @@ -33,6 +33,8 @@ public class ProjectableDescriptor public ParameterListSyntax? ParametersList { get; set; } + public IEnumerable? ParameterTypeNames { get; set; } + public TypeParameterListSyntax? TypeParameterList { get; set; } public SyntaxList? ConstraintClauses { get; set; } diff --git a/src/EntityFrameworkCore.Projectables.Generator/ProjectableInterpreter.cs b/src/EntityFrameworkCore.Projectables.Generator/ProjectableInterpreter.cs index 339b46b..e16d249 100644 --- a/src/EntityFrameworkCore.Projectables.Generator/ProjectableInterpreter.cs +++ b/src/EntityFrameworkCore.Projectables.Generator/ProjectableInterpreter.cs @@ -118,6 +118,8 @@ x is IPropertySymbol xProperty && var expressionSyntaxRewriter = new ExpressionSyntaxRewriter(memberSymbol.ContainingType, nullConditionalRewriteSupport, semanticModel, context); var declarationSyntaxRewriter = new DeclarationSyntaxRewriter(semanticModel); + var methodSymbol = memberSymbol as IMethodSymbol; + var descriptor = new ProjectableDescriptor { UsingDirectives = member.SyntaxTree.GetRoot().DescendantNodes().OfType(), @@ -128,6 +130,17 @@ x is IPropertySymbol xProperty && ParametersList = SyntaxFactory.ParameterList() }; + // Collect parameter type names for method overload disambiguation + if (methodSymbol is not null) + { + var parameterTypeNames = new List(); + foreach (var parameter in methodSymbol.Parameters) + { + parameterTypeNames.Add(parameter.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)); + } + descriptor.ParameterTypeNames = parameterTypeNames; + } + if (memberSymbol.ContainingType is INamedTypeSymbol { IsGenericType: true } containingNamedType) { descriptor.ClassTypeParameterList = SyntaxFactory.TypeParameterList(); @@ -196,8 +209,6 @@ x is IPropertySymbol xProperty && ); } - var methodSymbol = memberSymbol as IMethodSymbol; - if (methodSymbol is { IsExtensionMethod: true }) { var targetTypeSymbol = methodSymbol.Parameters.First().Type; diff --git a/src/EntityFrameworkCore.Projectables.Generator/ProjectionExpressionGenerator.cs b/src/EntityFrameworkCore.Projectables.Generator/ProjectionExpressionGenerator.cs index 6f177bc..abc89bd 100644 --- a/src/EntityFrameworkCore.Projectables.Generator/ProjectionExpressionGenerator.cs +++ b/src/EntityFrameworkCore.Projectables.Generator/ProjectionExpressionGenerator.cs @@ -63,7 +63,7 @@ static void Execute(MemberDeclarationSyntax member, Compilation compilation, Sou throw new InvalidOperationException("Expected a memberName here"); } - var generatedClassName = ProjectionExpressionClassNameGenerator.GenerateName(projectable.ClassNamespace, projectable.NestedInClassNames, projectable.MemberName); + var generatedClassName = ProjectionExpressionClassNameGenerator.GenerateName(projectable.ClassNamespace, projectable.NestedInClassNames, projectable.MemberName, projectable.ParameterTypeNames); var generatedFileName = projectable.ClassTypeParameterList is not null ? $"{generatedClassName}-{projectable.ClassTypeParameterList.ChildNodes().Count()}.g.cs" : $"{generatedClassName}.g.cs"; var classSyntax = ClassDeclaration(generatedClassName) diff --git a/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionClassNameGenerator.cs b/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionClassNameGenerator.cs index 1c63e77..fc6c765 100644 --- a/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionClassNameGenerator.cs +++ b/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionClassNameGenerator.cs @@ -11,21 +11,31 @@ public static class ProjectionExpressionClassNameGenerator public const string Namespace = "EntityFrameworkCore.Projectables.Generated"; public static string GenerateName(string? namespaceName, IEnumerable? nestedInClassNames, string memberName) + { + return GenerateName(namespaceName, nestedInClassNames, memberName, null); + } + + public static string GenerateName(string? namespaceName, IEnumerable? nestedInClassNames, string memberName, IEnumerable? parameterTypeNames) { var stringBuilder = new StringBuilder(); - return GenerateNameImpl(stringBuilder, namespaceName, nestedInClassNames, memberName); + return GenerateNameImpl(stringBuilder, namespaceName, nestedInClassNames, memberName, parameterTypeNames); } public static string GenerateFullName(string? namespaceName, IEnumerable? nestedInClassNames, string memberName) + { + return GenerateFullName(namespaceName, nestedInClassNames, memberName, null); + } + + public static string GenerateFullName(string? namespaceName, IEnumerable? nestedInClassNames, string memberName, IEnumerable? parameterTypeNames) { var stringBuilder = new StringBuilder(Namespace); stringBuilder.Append('.'); - return GenerateNameImpl(stringBuilder, namespaceName, nestedInClassNames, memberName); + return GenerateNameImpl(stringBuilder, namespaceName, nestedInClassNames, memberName, parameterTypeNames); } - static string GenerateNameImpl(StringBuilder stringBuilder, string? namespaceName, IEnumerable? nestedInClassNames, string memberName) + static string GenerateNameImpl(StringBuilder stringBuilder, string? namespaceName, IEnumerable? nestedInClassNames, string memberName, IEnumerable? parameterTypeNames) { stringBuilder.Append(namespaceName?.Replace('.', '_')); stringBuilder.Append('_'); @@ -63,6 +73,33 @@ static string GenerateNameImpl(StringBuilder stringBuilder, string? namespaceNam stringBuilder.Append(arity); } + // Add parameter types to make method overloads unique + if (parameterTypeNames is not null) + { + var parameterIndex = 0; + foreach (var parameterTypeName in parameterTypeNames) + { + stringBuilder.Append("_P"); + stringBuilder.Append(parameterIndex); + stringBuilder.Append('_'); + // Replace characters that are not valid in type names with underscores + var sanitizedTypeName = parameterTypeName + .Replace("global::", "") // Remove global:: prefix + .Replace('.', '_') + .Replace('<', '_') + .Replace('>', '_') + .Replace(',', '_') + .Replace(' ', '_') + .Replace('[', '_') + .Replace(']', '_') + .Replace('`', '_') + .Replace(':', '_') // Additional safety for any remaining colons + .Replace('?', '_'); // Handle nullable reference types + stringBuilder.Append(sanitizedTypeName); + parameterIndex++; + } + } + return stringBuilder.ToString(); } } diff --git a/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs b/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs index b9062dd..e0e7bc5 100644 --- a/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs +++ b/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs @@ -62,7 +62,19 @@ public LambdaExpression FindGeneratedExpression(MemberInfo projectableMemberInfo static LambdaExpression? GetExpressionFromGeneratedType(MemberInfo projectableMemberInfo) { var declaringType = projectableMemberInfo.DeclaringType ?? throw new InvalidOperationException("Expected a valid type here"); - var generatedContainingTypeName = ProjectionExpressionClassNameGenerator.GenerateFullName(declaringType.Namespace, declaringType.GetNestedTypePath().Select(x => x.Name), projectableMemberInfo.Name); + + // Get parameter types for method overload disambiguation + // Use the same format as Roslyn's SymbolDisplayFormat.FullyQualifiedFormat + // which uses C# keywords for primitive types (int, string, etc.) + string[]? parameterTypeNames = null; + if (projectableMemberInfo is MethodInfo method) + { + parameterTypeNames = method.GetParameters() + .Select(p => GetFullTypeName(p.ParameterType)) + .ToArray(); + } + + var generatedContainingTypeName = ProjectionExpressionClassNameGenerator.GenerateFullName(declaringType.Namespace, declaringType.GetNestedTypePath().Select(x => x.Name), projectableMemberInfo.Name, parameterTypeNames); var expressionFactoryType = declaringType.Assembly.GetType(generatedContainingTypeName); @@ -93,6 +105,79 @@ public LambdaExpression FindGeneratedExpression(MemberInfo projectableMemberInfo return null; } + + static string GetFullTypeName(Type type) + { + // Handle array types + if (type.IsArray) + { + var elementType = type.GetElementType(); + var rank = type.GetArrayRank(); + var elementTypeName = GetFullTypeName(elementType!); + + if (rank == 1) + { + return $"{elementTypeName}[]"; + } + else + { + var commas = new string(',', rank - 1); + return $"{elementTypeName}[{commas}]"; + } + } + + // Map primitive types to their C# keyword equivalents to match Roslyn's output + var typeKeyword = GetCSharpKeyword(type); + if (typeKeyword != null) + { + return typeKeyword; + } + + // For generic types, construct the full name matching Roslyn's format + if (type.IsGenericType) + { + var genericTypeDef = type.GetGenericTypeDefinition(); + var genericArgs = type.GetGenericArguments(); + var baseName = genericTypeDef.FullName ?? genericTypeDef.Name; + + // Remove the `n suffix (e.g., `1, `2) + var backtickIndex = baseName.IndexOf('`'); + if (backtickIndex > 0) + { + baseName = baseName.Substring(0, backtickIndex); + } + + var args = string.Join(", ", genericArgs.Select(GetFullTypeName)); + return $"{baseName}<{args}>"; + } + + if (type.FullName != null) + { + return type.FullName; + } + + return type.Name; + } + + static string? GetCSharpKeyword(Type type) + { + if (type == typeof(bool)) return "bool"; + if (type == typeof(byte)) return "byte"; + if (type == typeof(sbyte)) return "sbyte"; + if (type == typeof(char)) return "char"; + if (type == typeof(decimal)) return "decimal"; + if (type == typeof(double)) return "double"; + if (type == typeof(float)) return "float"; + if (type == typeof(int)) return "int"; + if (type == typeof(uint)) return "uint"; + if (type == typeof(long)) return "long"; + if (type == typeof(ulong)) return "ulong"; + if (type == typeof(short)) return "short"; + if (type == typeof(ushort)) return "ushort"; + if (type == typeof(object)) return "object"; + if (type == typeof(string)) return "string"; + return null; + } } } } From b7cf397a4c33ff9cbb7e5ed88004186cebb1edd6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 10:25:17 +0000 Subject: [PATCH 3/6] Fix generic type parameter handling and arity marker positioning Co-authored-by: PhenX <42170+PhenX@users.noreply.github.com> --- .../ProjectionExpressionClassNameGenerator.cs | 14 +++-- .../Services/ProjectionExpressionResolver.cs | 27 ++++++++- .../ProjectionExpressionGeneratorTests.cs | 60 +++++++++++++++++++ 3 files changed, 92 insertions(+), 9 deletions(-) diff --git a/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionClassNameGenerator.cs b/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionClassNameGenerator.cs index fc6c765..181b135 100644 --- a/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionClassNameGenerator.cs +++ b/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionClassNameGenerator.cs @@ -67,12 +67,6 @@ static string GenerateNameImpl(StringBuilder stringBuilder, string? namespaceNam } stringBuilder.Append(memberName); - if (arity > 0) - { - stringBuilder.Append('`'); - stringBuilder.Append(arity); - } - // Add parameter types to make method overloads unique if (parameterTypeNames is not null) { @@ -100,6 +94,14 @@ static string GenerateNameImpl(StringBuilder stringBuilder, string? namespaceNam } } + // Add generic arity at the very end (after parameter types) + // This matches how the CLR names generic types + if (arity > 0) + { + stringBuilder.Append('`'); + stringBuilder.Append(arity); + } + return stringBuilder.ToString(); } } diff --git a/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs b/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs index e0e7bc5..1ce1502 100644 --- a/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs +++ b/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs @@ -63,13 +63,27 @@ public LambdaExpression FindGeneratedExpression(MemberInfo projectableMemberInfo { var declaringType = projectableMemberInfo.DeclaringType ?? throw new InvalidOperationException("Expected a valid type here"); + // Keep track of the original declaring type's generic arguments for later use + var originalDeclaringType = declaringType; + + // For generic types, use the generic type definition to match the generated name + // which is based on the open generic type + if (declaringType.IsGenericType && !declaringType.IsGenericTypeDefinition) + { + declaringType = declaringType.GetGenericTypeDefinition(); + } + // Get parameter types for method overload disambiguation // Use the same format as Roslyn's SymbolDisplayFormat.FullyQualifiedFormat // which uses C# keywords for primitive types (int, string, etc.) string[]? parameterTypeNames = null; if (projectableMemberInfo is MethodInfo method) { - parameterTypeNames = method.GetParameters() + // For generic methods, use the generic definition to get parameter types + // This ensures type parameters like TEntity are used instead of concrete types + var methodToInspect = method.IsGenericMethod ? method.GetGenericMethodDefinition() : method; + + parameterTypeNames = methodToInspect.GetParameters() .Select(p => GetFullTypeName(p.ParameterType)) .ToArray(); } @@ -82,7 +96,7 @@ public LambdaExpression FindGeneratedExpression(MemberInfo projectableMemberInfo { if (expressionFactoryType.IsGenericTypeDefinition) { - expressionFactoryType = expressionFactoryType.MakeGenericType(declaringType.GenericTypeArguments); + expressionFactoryType = expressionFactoryType.MakeGenericType(originalDeclaringType.GenericTypeArguments); } var expressionFactoryMethod = expressionFactoryType.GetMethod("Expression", BindingFlags.Static | BindingFlags.NonPublic); @@ -108,6 +122,12 @@ public LambdaExpression FindGeneratedExpression(MemberInfo projectableMemberInfo static string GetFullTypeName(Type type) { + // Handle generic type parameters (e.g., T, TEntity) + if (type.IsGenericParameter) + { + return type.Name; + } + // Handle array types if (type.IsArray) { @@ -153,7 +173,8 @@ static string GetFullTypeName(Type type) if (type.FullName != null) { - return type.FullName; + // Replace + with . for nested types to match Roslyn's format + return type.FullName.Replace('+', '.'); } return type.Name; diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.cs b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.cs index 2a74263..5267db2 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.cs +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.cs @@ -1902,6 +1902,66 @@ public Task GenericTypesWithConstraints() return Verifier.Verify(result.GeneratedTrees[0].ToString()); } + [Fact] + public Task MethodOverloads_WithDifferentParameterTypes() + { + var compilation = CreateCompilation(@" +using System; +using EntityFrameworkCore.Projectables; +namespace Foo { + class C { + [Projectable] + public int Method(int x) => x; + + [Projectable] + public int Method(string s) => s.Length; + } +} +"); + + var result = RunGenerator(compilation); + + Assert.Empty(result.Diagnostics); + Assert.Equal(2, result.GeneratedTrees.Length); + + // Verify both overloads are generated with distinct names + var generatedFiles = result.GeneratedTrees.Select(t => t.FilePath).ToList(); + Assert.Contains(generatedFiles, f => f.Contains("Method_P0_int")); + Assert.Contains(generatedFiles, f => f.Contains("Method_P0_string")); + + return Verifier.Verify(result.GeneratedTrees.Select(t => t.ToString())); + } + + [Fact] + public Task MethodOverloads_WithDifferentParameterCounts() + { + var compilation = CreateCompilation(@" +using System; +using EntityFrameworkCore.Projectables; +namespace Foo { + class C { + [Projectable] + public int Method(int x) => x; + + [Projectable] + public int Method(int x, int y) => x + y; + } +} +"); + + var result = RunGenerator(compilation); + + Assert.Empty(result.Diagnostics); + Assert.Equal(2, result.GeneratedTrees.Length); + + // Verify both overloads are generated with distinct names + var generatedFiles = result.GeneratedTrees.Select(t => t.FilePath).ToList(); + Assert.Contains(generatedFiles, f => f.Contains("Method_P0_int.g.cs")); + Assert.Contains(generatedFiles, f => f.Contains("Method_P0_int_P1_int.g.cs")); + + return Verifier.Verify(result.GeneratedTrees.Select(t => t.ToString())); + } + #region Helpers Compilation CreateCompilation(string source, bool expectedToCompile = true) From 593aa35655fd435017735c7d16b96674880dc65f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 10:27:52 +0000 Subject: [PATCH 4/6] Add functional tests for method overloads Co-authored-by: PhenX <42170+PhenX@users.noreply.github.com> --- .../MethodOverloadsTests.cs | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.cs diff --git a/tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.cs b/tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.cs new file mode 100644 index 0000000..dbe24c4 --- /dev/null +++ b/tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.cs @@ -0,0 +1,48 @@ +using System.Linq; +using System.Threading.Tasks; +using EntityFrameworkCore.Projectables; +using EntityFrameworkCore.Projectables.FunctionalTests.Helpers; +using Microsoft.EntityFrameworkCore; +using VerifyXunit; +using Xunit; + +namespace EntityFrameworkCore.Projectables.FunctionalTests +{ + [UsesVerify] + public class MethodOverloadsTests + { + public record Entity + { + public int Id { get; set; } + public string Name { get; set; } = ""; + + [Projectable] + public int Calculate(int x) => Id + x; + + [Projectable] + public int Calculate(string prefix) => (prefix + Name).Length; + } + + [Fact] + public Task MethodOverload_WithIntParameter() + { + using var dbContext = new SampleDbContext(); + + var query = dbContext.Set() + .Select(e => new { e.Id, Result = e.Calculate(10) }); + + return Verifier.Verify(query.ToQueryString()); + } + + [Fact] + public Task MethodOverload_WithStringParameter() + { + using var dbContext = new SampleDbContext(); + + var query = dbContext.Set() + .Select(e => new { e.Id, Result = e.Calculate("Hello_") }); + + return Verifier.Verify(query.ToQueryString()); + } + } +} From 4de1f8bd417a6564978b683387758fe582c2aa6e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Nov 2025 10:29:24 +0000 Subject: [PATCH 5/6] Address code review feedback - improve defensive programming Co-authored-by: PhenX <42170+PhenX@users.noreply.github.com> --- .../ProjectableInterpreter.cs | 9 +++------ .../Services/ProjectionExpressionResolver.cs | 8 +++++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/EntityFrameworkCore.Projectables.Generator/ProjectableInterpreter.cs b/src/EntityFrameworkCore.Projectables.Generator/ProjectableInterpreter.cs index e16d249..0f21519 100644 --- a/src/EntityFrameworkCore.Projectables.Generator/ProjectableInterpreter.cs +++ b/src/EntityFrameworkCore.Projectables.Generator/ProjectableInterpreter.cs @@ -133,12 +133,9 @@ x is IPropertySymbol xProperty && // Collect parameter type names for method overload disambiguation if (methodSymbol is not null) { - var parameterTypeNames = new List(); - foreach (var parameter in methodSymbol.Parameters) - { - parameterTypeNames.Add(parameter.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)); - } - descriptor.ParameterTypeNames = parameterTypeNames; + descriptor.ParameterTypeNames = methodSymbol.Parameters + .Select(p => p.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)) + .ToList(); } if (memberSymbol.ContainingType is INamedTypeSymbol { IsGenericType: true } containingNamedType) diff --git a/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs b/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs index 1ce1502..55cb469 100644 --- a/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs +++ b/src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs @@ -132,8 +132,14 @@ static string GetFullTypeName(Type type) if (type.IsArray) { var elementType = type.GetElementType(); + if (elementType == null) + { + // Fallback for edge cases where GetElementType() might return null + return type.Name; + } + var rank = type.GetArrayRank(); - var elementTypeName = GetFullTypeName(elementType!); + var elementTypeName = GetFullTypeName(elementType); if (rank == 1) { From 846a0ba858d30e34a0c89c64a6a206c1018ee98e Mon Sep 17 00:00:00 2001 From: "fabien.menager" Date: Sun, 23 Nov 2025 12:40:35 +0100 Subject: [PATCH 6/6] Update Verify files --- ...thodOverload_WithIntParameter.verified.txt | 2 + ...dOverload_WithStringParameter.verified.txt | 2 + ...writeSupport_IsBeingRewritten.verified.txt | 2 +- ...ExpressionGeneratorTests.Cast.verified.txt | 2 +- ...NamesAreGettingFullyQualified.verified.txt | 2 +- ...Tests.DefaultValuesGetRemoved.verified.txt | 2 +- ...onGeneratorTests.EnumAccessor.verified.txt | 2 +- ...s.GenericMethods_AreRewritten.verified.txt | 2 +- ...erenceTypesAreBeingEliminated.verified.txt | 2 +- ..._WithDifferentParameterCounts.verified.txt | 37 +++++++++++++++++++ ...s_WithDifferentParameterTypes.verified.txt | 37 +++++++++++++++++++ ...imaryConstructorAndProperties.verified.txt | 2 +- ...nalNullCoalesceTypeConversion.verified.txt | 2 +- ...gnoreSupport_IsBeingRewritten.verified.txt | 2 +- ...writeSupport_IsBeingRewritten.verified.txt | 2 +- ...gnoreSupport_IsBeingRewritten.verified.txt | 2 +- ...writeSupport_IsBeingRewritten.verified.txt | 2 +- ...gnoreSupport_IsBeingRewritten.verified.txt | 2 +- ...writeSupport_IsBeingRewritten.verified.txt | 2 +- ...writeSupport_IsBeingRewritten.verified.txt | 2 +- ...ypeCastOperatorGetsEliminated.verified.txt | 2 +- ...erenceTypesAreBeingEliminated.verified.txt | 2 +- ...gnoreSupport_IsBeingRewritten.verified.txt | 2 +- ...writeSupport_IsBeingRewritten.verified.txt | 2 +- ...ableValueCastOperatorsPersist.verified.txt | 2 +- ...sts.ParamsModifiedGetsRemoved.verified.txt | 2 +- ...edMethodWithMultipleArguments.verified.txt | 2 +- ...putedMethodWithSingleArgument.verified.txt | 2 +- ...ts.ProjectableExtensionMethod.verified.txt | 2 +- ...s.ProjectableExtensionMethod2.verified.txt | 2 +- ...s.ProjectableExtensionMethod3.verified.txt | 2 +- ...s.ProjectableExtensionMethod4.verified.txt | 2 +- ...ts.StaticMethodWithParameters.verified.txt | 2 +- ...ExpressionWithConstantPattern.verified.txt | 2 +- ...itchExpressionWithTypePattern.verified.txt | 2 +- 35 files changed, 109 insertions(+), 31 deletions(-) create mode 100644 tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.MethodOverload_WithIntParameter.verified.txt create mode 100644 tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.MethodOverload_WithStringParameter.verified.txt create mode 100644 tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MethodOverloads_WithDifferentParameterCounts.verified.txt create mode 100644 tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MethodOverloads_WithDifferentParameterTypes.verified.txt diff --git a/tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.MethodOverload_WithIntParameter.verified.txt b/tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.MethodOverload_WithIntParameter.verified.txt new file mode 100644 index 0000000..e5e6812 --- /dev/null +++ b/tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.MethodOverload_WithIntParameter.verified.txt @@ -0,0 +1,2 @@ +SELECT [e].[Id], [e].[Id] + 10 AS [Result] +FROM [Entity] AS [e] \ No newline at end of file diff --git a/tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.MethodOverload_WithStringParameter.verified.txt b/tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.MethodOverload_WithStringParameter.verified.txt new file mode 100644 index 0000000..d9749ce --- /dev/null +++ b/tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.MethodOverload_WithStringParameter.verified.txt @@ -0,0 +1,2 @@ +SELECT [e].[Id], CAST(LEN(N'Hello_' + [e].[Name]) AS int) AS [Result] +FROM [Entity] AS [e] \ No newline at end of file diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.BooleanSimpleTernary_WithRewriteSupport_IsBeingRewritten.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.BooleanSimpleTernary_WithRewriteSupport_IsBeingRewritten.verified.txt index 2e61855..8fb3344 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.BooleanSimpleTernary_WithRewriteSupport_IsBeingRewritten.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.BooleanSimpleTernary_WithRewriteSupport_IsBeingRewritten.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_Test + static class Foo_C_Test_P0_object { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.Cast.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.Cast.verified.txt index 0035477..cf931bf 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.Cast.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.Cast.verified.txt @@ -6,7 +6,7 @@ using Projectables.Repro; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Projectables_Repro_SomeExtensions_AsSomeResult + static class Projectables_Repro_SomeExtensions_AsSomeResult_P0_Projectables_Repro_SomeEntity { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.DeclarationTypeNamesAreGettingFullyQualified.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.DeclarationTypeNamesAreGettingFullyQualified.verified.txt index dd9cb44..cec10d1 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.DeclarationTypeNamesAreGettingFullyQualified.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.DeclarationTypeNamesAreGettingFullyQualified.verified.txt @@ -9,7 +9,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_EntityExtensions_Entity_Something + static class Foo_EntityExtensions_Entity_Something_P0_Foo_EntityExtensions_Entity { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.DefaultValuesGetRemoved.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.DefaultValuesGetRemoved.verified.txt index 0cb3392..b0c3e64 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.DefaultValuesGetRemoved.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.DefaultValuesGetRemoved.verified.txt @@ -5,7 +5,7 @@ using EntityFrameworkCore.Projectables; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class _Foo_Calculate + static class _Foo_Calculate_P0_int { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.EnumAccessor.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.EnumAccessor.verified.txt index ce25012..d108871 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.EnumAccessor.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.EnumAccessor.verified.txt @@ -5,7 +5,7 @@ using EntityFrameworkCore.Projectables; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class _SomeExtensions_Test + static class _SomeExtensions_Test_P0_SomeFlag { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.GenericMethods_AreRewritten.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.GenericMethods_AreRewritten.verified.txt index 5468c2a..973cde3 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.GenericMethods_AreRewritten.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.GenericMethods_AreRewritten.verified.txt @@ -9,7 +9,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_EntityExtensions_EnforceString + static class Foo_EntityExtensions_EnforceString_P0_T { static global::System.Linq.Expressions.Expression> Expression() where T : unmanaged diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.GenericNullableReferenceTypesAreBeingEliminated.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.GenericNullableReferenceTypesAreBeingEliminated.verified.txt index 847f758..0993caa 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.GenericNullableReferenceTypesAreBeingEliminated.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.GenericNullableReferenceTypesAreBeingEliminated.verified.txt @@ -9,7 +9,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_NextFoo + static class Foo_C_NextFoo_P0_System_Collections_Generic_List_object__P1_System_Collections_Generic_List_int__ { static global::System.Linq.Expressions.Expression, global::System.Collections.Generic.List, global::System.Collections.Generic.List>> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MethodOverloads_WithDifferentParameterCounts.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MethodOverloads_WithDifferentParameterCounts.verified.txt new file mode 100644 index 0000000..f383978 --- /dev/null +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MethodOverloads_WithDifferentParameterCounts.verified.txt @@ -0,0 +1,37 @@ +[ +// +#nullable disable +using System; +using EntityFrameworkCore.Projectables; +using Foo; + +namespace EntityFrameworkCore.Projectables.Generated +{ + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + static class Foo_C_Method_P0_int + { + static global::System.Linq.Expressions.Expression> Expression() + { + return (global::Foo.C @this, int x) => x; + } + } +} + +// +#nullable disable +using System; +using EntityFrameworkCore.Projectables; +using Foo; + +namespace EntityFrameworkCore.Projectables.Generated +{ + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + static class Foo_C_Method_P0_int_P1_int + { + static global::System.Linq.Expressions.Expression> Expression() + { + return (global::Foo.C @this, int x, int y) => x + y; + } + } +} +] \ No newline at end of file diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MethodOverloads_WithDifferentParameterTypes.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MethodOverloads_WithDifferentParameterTypes.verified.txt new file mode 100644 index 0000000..3113734 --- /dev/null +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MethodOverloads_WithDifferentParameterTypes.verified.txt @@ -0,0 +1,37 @@ +[ +// +#nullable disable +using System; +using EntityFrameworkCore.Projectables; +using Foo; + +namespace EntityFrameworkCore.Projectables.Generated +{ + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + static class Foo_C_Method_P0_int + { + static global::System.Linq.Expressions.Expression> Expression() + { + return (global::Foo.C @this, int x) => x; + } + } +} + +// +#nullable disable +using System; +using EntityFrameworkCore.Projectables; +using Foo; + +namespace EntityFrameworkCore.Projectables.Generated +{ + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + static class Foo_C_Method_P0_string + { + static global::System.Linq.Expressions.Expression> Expression() + { + return (global::Foo.C @this, string s) => s.Length; + } + } +} +] \ No newline at end of file diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MixPrimaryConstructorAndProperties.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MixPrimaryConstructorAndProperties.verified.txt index bb4a054..84bf825 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MixPrimaryConstructorAndProperties.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.MixPrimaryConstructorAndProperties.verified.txt @@ -9,7 +9,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_EntityExtensions_Entity_Something + static class Foo_EntityExtensions_Entity_Something_P0_Foo_EntityExtensions_Entity { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullConditionalNullCoalesceTypeConversion.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullConditionalNullCoalesceTypeConversion.verified.txt index 90ab28c..f366397 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullConditionalNullCoalesceTypeConversion.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullConditionalNullCoalesceTypeConversion.verified.txt @@ -5,7 +5,7 @@ using EntityFrameworkCore.Projectables; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class _Foo_SomeNumber + static class _Foo_SomeNumber_P0_Foo { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementAndMemberBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementAndMemberBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt index 3d8995b..0153a0f 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementAndMemberBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementAndMemberBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt @@ -9,7 +9,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_EntityExtensions_GetFirstRelatedIgnoreNulls + static class Foo_EntityExtensions_GetFirstRelatedIgnoreNulls_P0_Foo_EntityExtensions_Entity { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementAndMemberBinding_WithRewriteSupport_IsBeingRewritten.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementAndMemberBinding_WithRewriteSupport_IsBeingRewritten.verified.txt index 7c950f2..010f995 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementAndMemberBinding_WithRewriteSupport_IsBeingRewritten.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementAndMemberBinding_WithRewriteSupport_IsBeingRewritten.verified.txt @@ -9,7 +9,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_EntityExtensions_GetFirstRelatedIgnoreNulls + static class Foo_EntityExtensions_GetFirstRelatedIgnoreNulls_P0_Foo_EntityExtensions_Entity { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt index 0420fa1..aff9e8b 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_GetFirst + static class Foo_C_GetFirst_P0_string { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementBinding_WithRewriteSupport_IsBeingRewritten.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementBinding_WithRewriteSupport_IsBeingRewritten.verified.txt index 76ccb92..c881b5d 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementBinding_WithRewriteSupport_IsBeingRewritten.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableElementBinding_WithRewriteSupport_IsBeingRewritten.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_GetFirst + static class Foo_C_GetFirst_P0_string { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableMemberBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableMemberBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt index b8ce72b..97ef48d 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableMemberBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableMemberBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_GetLength + static class Foo_C_GetLength_P0_string { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableMemberBinding_WithRewriteSupport_IsBeingRewritten.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableMemberBinding_WithRewriteSupport_IsBeingRewritten.verified.txt index 402a7e3..4b30f5d 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableMemberBinding_WithRewriteSupport_IsBeingRewritten.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableMemberBinding_WithRewriteSupport_IsBeingRewritten.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_GetLength + static class Foo_C_GetLength_P0_string { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableParameters_WithRewriteSupport_IsBeingRewritten.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableParameters_WithRewriteSupport_IsBeingRewritten.verified.txt index 19c08b4..fc9af02 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableParameters_WithRewriteSupport_IsBeingRewritten.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableParameters_WithRewriteSupport_IsBeingRewritten.verified.txt @@ -9,7 +9,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_EntityExtensions_GetFirstName + static class Foo_EntityExtensions_GetFirstName_P0_Foo_EntityExtensions_Entity { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableReferenceTypeCastOperatorGetsEliminated.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableReferenceTypeCastOperatorGetsEliminated.verified.txt index aa6fd95..48f6a5f 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableReferenceTypeCastOperatorGetsEliminated.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableReferenceTypeCastOperatorGetsEliminated.verified.txt @@ -9,7 +9,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_NullableReferenceType + static class Foo_C_NullableReferenceType_P0_object { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableReferenceTypesAreBeingEliminated.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableReferenceTypesAreBeingEliminated.verified.txt index 88826b1..f880d94 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableReferenceTypesAreBeingEliminated.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableReferenceTypesAreBeingEliminated.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_NextFoo + static class Foo_C_NextFoo_P0_object_P1_int_ { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableSimpleElementBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableSimpleElementBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt index 827dcb3..fe0230a 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableSimpleElementBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableSimpleElementBinding_WithIgnoreSupport_IsBeingRewritten.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_GetFirst + static class Foo_C_GetFirst_P0_string { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableSimpleElementBinding_WithRewriteSupport_IsBeingRewritten.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableSimpleElementBinding_WithRewriteSupport_IsBeingRewritten.verified.txt index a6732e1..d34d367 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableSimpleElementBinding_WithRewriteSupport_IsBeingRewritten.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableSimpleElementBinding_WithRewriteSupport_IsBeingRewritten.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_GetFirst + static class Foo_C_GetFirst_P0_string { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableValueCastOperatorsPersist.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableValueCastOperatorsPersist.verified.txt index 3f93eac..8cfc5e5 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableValueCastOperatorsPersist.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.NullableValueCastOperatorsPersist.verified.txt @@ -9,7 +9,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_NullableValueType + static class Foo_C_NullableValueType_P0_object { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ParamsModifiedGetsRemoved.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ParamsModifiedGetsRemoved.verified.txt index 3f5152f..4231778 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ParamsModifiedGetsRemoved.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ParamsModifiedGetsRemoved.verified.txt @@ -5,7 +5,7 @@ using EntityFrameworkCore.Projectables; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class _Foo_First + static class _Foo_First_P0_int__ { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableComputedMethodWithMultipleArguments.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableComputedMethodWithMultipleArguments.verified.txt index e6f1903..6a50a32 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableComputedMethodWithMultipleArguments.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableComputedMethodWithMultipleArguments.verified.txt @@ -7,7 +7,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_Foo + static class Foo_C_Foo_P0_int_P1_string_P2_object { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableComputedMethodWithSingleArgument.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableComputedMethodWithSingleArgument.verified.txt index 38b5559..864fb95 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableComputedMethodWithSingleArgument.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableComputedMethodWithSingleArgument.verified.txt @@ -7,7 +7,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_Foo + static class Foo_C_Foo_P0_int { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod.verified.txt index e62ff27..8e8012f 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_Foo + static class Foo_C_Foo_P0_Foo_D { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod2.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod2.verified.txt index 4211a85..b17f73b 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod2.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod2.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_Foo + static class Foo_C_Foo_P0_int { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod3.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod3.verified.txt index 0bd0865..bf3ca9c 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod3.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod3.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_Foo1 + static class Foo_C_Foo1_P0_int { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod4.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod4.verified.txt index 636c199..03de978 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod4.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.ProjectableExtensionMethod4.verified.txt @@ -8,7 +8,7 @@ using Foo; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class Foo_C_Foo1 + static class Foo_C_Foo1_P0_object { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.StaticMethodWithParameters.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.StaticMethodWithParameters.verified.txt index 6bfafc8..f5a9570 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.StaticMethodWithParameters.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.StaticMethodWithParameters.verified.txt @@ -8,7 +8,7 @@ using EntityFrameworkCore.Projectables; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class _Foo_Zero + static class _Foo_Zero_P0_int { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.SwitchExpressionWithConstantPattern.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.SwitchExpressionWithConstantPattern.verified.txt index 00c6d5e..e906cc7 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.SwitchExpressionWithConstantPattern.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.SwitchExpressionWithConstantPattern.verified.txt @@ -5,7 +5,7 @@ using EntityFrameworkCore.Projectables; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class _Foo_SomeNumber + static class _Foo_SomeNumber_P0_int { static global::System.Linq.Expressions.Expression> Expression() { diff --git a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.SwitchExpressionWithTypePattern.verified.txt b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.SwitchExpressionWithTypePattern.verified.txt index dcb1ec1..c9efd3c 100644 --- a/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.SwitchExpressionWithTypePattern.verified.txt +++ b/tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.SwitchExpressionWithTypePattern.verified.txt @@ -5,7 +5,7 @@ using EntityFrameworkCore.Projectables; namespace EntityFrameworkCore.Projectables.Generated { [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - static class _ItemMapper_ToData + static class _ItemMapper_ToData_P0_Item { static global::System.Linq.Expressions.Expression> Expression() {