Skip to content

Conversation

@Dreamescaper
Copy link
Owner

No description provided.

@Dreamescaper Dreamescaper requested a review from Copilot July 25, 2025 14:09
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

This PR adds support for resolving additional type arguments for CustomHandler methods when they have multiple generic type parameters. The enhancement allows CustomHandler methods to automatically receive type arguments from the matched AssignableTo type, enabling more sophisticated scenarios like Entity Framework's IEntityTypeConfiguration pattern.

Key changes:

  • Enhanced CustomHandlerModel to support multiple type arguments instead of a single type name
  • Added validation for CustomHandler methods with multiple generic parameters
  • Modified source generation to properly format multiple generic arguments in method invocations

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
version.json Bumped version from 2.1 to 2.2
ServiceRegistrationModel.cs Changed CustomHandlerModel to use EquatableArray for type arguments
AttributeModel.cs Added tracking of type parameter counts for AssignableTo and CustomHandler
DependencyInjectionGenerator.cs Updated source generation to handle multiple generic arguments
DependencyInjectionGenerator.ParseMethodModel.cs Added validation for CustomHandler generic parameter compatibility
DependencyInjectionGenerator.FindServicesToRegister.cs Enhanced logic to resolve multiple type arguments from matched types
CustomHandlerTests.cs Added test case for the new generic argument resolution feature
README.md Added documentation example for EF Core IEntityTypeConfiguration usage

@Dreamescaper Dreamescaper merged commit 7fd4b30 into main Jul 25, 2025
1 check passed
@Dreamescaper Dreamescaper deleted the resolve-generic-arguments branch July 25, 2025 14:13
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