Skip to content

Conversation

@Dreamescaper
Copy link
Owner

No description provided.

@Dreamescaper Dreamescaper requested a review from Copilot August 19, 2025 12:14
Copy link
Contributor

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

Enhances the source generator to find CustomHandler and KeySelector methods from base types, not just the containing type directly. This allows inheritance of these methods from parent classes.

  • Replaces direct member searches with a new GetMethod extension method that traverses inheritance hierarchy
  • Adds accessibility and static context validation using SemanticModel.IsAccessible
  • Updates method signature to include SemanticModel parameter for accessibility checks

Reviewed Changes

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

File Description
ServiceScan.SourceGenerator/Model/AttributeModel.cs Updates Create method to use new GetMethod extension and pass SemanticModel
ServiceScan.SourceGenerator/Extensions/TypeSymbolExtensions.cs Adds new extension method that searches inheritance hierarchy with accessibility checks
ServiceScan.SourceGenerator/DependencyInjectionGenerator.ParseMethodModel.cs Updates method calls to use new GetMethod extension and refactors loop
ServiceScan.SourceGenerator.Tests/CustomHandlerTests.cs Adds test case verifying inheritance functionality works correctly

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Dreamescaper Dreamescaper merged commit a79dd6b into main Aug 19, 2025
1 check passed
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.

2 participants