Skip to content

Comments

Allow filtering types by attribute present#19

Merged
Dreamescaper merged 1 commit intomainfrom
with-attribute-filter
Mar 21, 2025
Merged

Allow filtering types by attribute present#19
Dreamescaper merged 1 commit intomainfrom
with-attribute-filter

Conversation

@Dreamescaper
Copy link
Owner

Related to #18 .

@Dreamescaper Dreamescaper requested a review from Copilot March 21, 2025 14:21
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 filtering types by checking for the presence of a specified attribute.

  • Introduces a new WithAttribute property in the attribute and updates its documentation.
  • Updates the dependency injection generator to include filtering logic based on WithAttribute.
  • Adds tests to validate the new filtering behavior.

Reviewed Changes

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

Show a summary per file
File Description
ServiceScan.SourceGenerator.Tests/AddServicesTests.cs Added tests for filtering services by attribute and with type name filter.
ServiceScan.SourceGenerator/GenerateAttributeSource.cs Added WithAttribute property along with its XML documentation.
ServiceScan.SourceGenerator/DependencyInjectionGenerator.FilterTypes.cs Updated filtering logic to account for WithAttribute in type selection.
ServiceScan.SourceGenerator/Model/AttributeModel.cs Updated model to include WithAttributeTypeName and adjust search criteria.
README.md Updated documentation to reflect the new WithAttribute filtering option.
Files not reviewed (2)
  • ServiceScan.SourceGenerator.Tests/ServiceScan.SourceGenerator.Tests.csproj: Language not supported
  • version.json: Language not supported

@Dreamescaper Dreamescaper merged commit a6ba430 into main Mar 21, 2025
1 check passed
@Dreamescaper Dreamescaper deleted the with-attribute-filter branch March 21, 2025 14:22
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