Skip to content

Conversation

@Dreamescaper
Copy link
Owner

No description provided.

@Dreamescaper Dreamescaper requested a review from Copilot October 1, 2025 15:24
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 aims to prevent generation of registrations for generic (open) implementation types when a CustomHandler is used, and to improve clarity by using named arguments in service registration construction.

  • Add filtering to skip generic types when a CustomHandler is specified.
  • Use named arguments for ResolveImplementation and IsOpenGeneric to improve readability.
  • Add a unit test and update the playground to demonstrate decorator-based custom handling.

Reviewed Changes

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

File Description
ServiceScan.SourceGenerator/DependencyInjectionGenerator.FindServicesToRegister.cs Switch to named arguments for ResolveImplementation/IsOpenGeneric, clarifying intent in service registration construction.
ServiceScan.SourceGenerator/DependencyInjectionGenerator.FilterTypes.cs Add filter to skip generic types when a CustomHandler is present.
ServiceScan.SourceGenerator.Tests/CustomHandlerTests.cs Add test to validate decorated handler generation for non-generic implementations.
ServiceScan.SourceGenerator.Playground/ServiceCollectionExtensions.cs Update playground to show CustomHandler with decorator pattern.

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

@Dreamescaper Dreamescaper merged commit 0670eaa into main Oct 1, 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