Skip to content

Conversation

@PhenX
Copy link
Collaborator

@PhenX PhenX commented Jan 14, 2026

Fixes #141

Copilot AI and others added 3 commits January 14, 2026 20:52
Co-authored-by: PhenX <42170+PhenX@users.noreply.github.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for C# 14 extension members to the EntityFrameworkCore.Projectables source generator. Extension members are a new C# 14 feature that allow defining members within an extension() block, providing a more natural syntax for extending types compared to traditional extension methods.

Changes:

  • Updated Microsoft.CodeAnalysis.CSharp to version 5.0.0 to support C# 14 features
  • Modified the source generator to detect and process extension members using the IsExtension property
  • Added logic to rewrite extension parameter references (e.g., e) to @this in generated expressions
  • Added comprehensive test coverage including generator tests and functional tests for extension member properties, methods, and methods with parameters

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Directory.Packages.props Updated Microsoft.CodeAnalysis.CSharp from 4.11.0 to 5.0.0
Directory.Build.props Added conditional LangVersion 14.0 for net10.0 target framework
ProjectableInterpreter.cs Added extension member detection and handling logic with helper methods
ExpressionSyntaxRewriter.cs Added extension parameter name tracking and identifier replacement
ProjectionExpressionGeneratorTests.cs Added 5 generator tests for extension member scenarios (NET10_0_OR_GREATER)
ExtensionMemberTests.cs Added 2 functional tests for extension member methods
EntityExtensions.cs Added extension member definitions for Entity and int types
Entity.cs Added Entity class for extension member testing
Various .verified.txt files Expected output verification files for all new tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@PhenX PhenX requested a review from koenbeuk January 15, 2026 08:12
@PhenX PhenX changed the title Copilot/add csharp 14 extension members Add csharp 14 extension members Jan 15, 2026
@PhenX PhenX changed the title Add csharp 14 extension members Add C#14 extension members Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support C# 14 extension members

1 participant