Skip to content

Add ability to exclude by type name or attribute #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Dreamescaper
Copy link
Owner

No description provided.

@Dreamescaper Dreamescaper requested a review from Copilot April 25, 2025 10:36
Copy link
Contributor

@Copilot 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 functionality to exclude types from service registrations based on either their type name (using wildcards) or by the presence of a specific attribute. Key changes include updating the AttributeModel to support new exclusion parameters, extending the attribute generator to include new properties with updated documentation, and adjusting the dependency injection filtering along with adding corresponding tests.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ServiceScan.SourceGenerator/Model/AttributeModel.cs Added new parameters to capture exclusion options and updated the Create method accordingly.
ServiceScan.SourceGenerator/GenerateAttributeSource.cs Introduced new attribute properties and adjusted documentation.
ServiceScan.SourceGenerator/DependencyInjectionGenerator.FilterTypes.cs Incorporated new logic to filter out types based on exclusion rules.
ServiceScan.SourceGenerator.Tests/AddServicesTests.cs Added tests for excluding services by type name and attribute.
README.md Updated usage documentation to reflect the new exclusion properties.

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.

1 participant