Skip to content

Conversation

@TonyTroeff
Copy link
Member

@TonyTroeff TonyTroeff commented Mar 6, 2025

Pull Request Description

This PR introduces enhancements primarily centered around enabling open generic service registration within the built-in dependency injection container.

This PR also changes the visibility of the ServiceConfiguration.LifetimeIsSet member to internal (it is not expected for this property to be used externally).

Motivation and Context

The changes aim to enhance support for registering generic services as either open or closed generics, depending on what's necessary. This simplifies and expands the usability of the module for automatic registration of services, making it more flexible and capable of handling a wider variety of scenarios.

Checklist

  • I have tested these changes thoroughly.
  • I have added/updated relevant documentation.
  • My code follows the project's coding guidelines.
  • I have performed a self-review of my changes.
  • My changes are backwards compatible.

…a supported type for named attribute parameters.
Introduced parameterized tests for generic service registrations to improve coverage and flexibility. Adjusted logic in `ServiceRegistrar` to handle open generic interfaces correctly by using their generic type definitions. Streamlined and simplified test data sources for better readability and maintainability.
@TonyTroeff TonyTroeff added the feature Something that should be implemented label Mar 6, 2025
@TonyTroeff TonyTroeff self-assigned this Mar 6, 2025
Extended tests to include multi-generic services and adjusted attribute usage for them. Simplified interfaces and class definitions to use modern C# syntax. Updated project file to enable the latest language version.
Copy link
Member Author

@TonyTroeff TonyTroeff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had no comments after self-reviewing my PR.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Something that should be implemented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically register an open generic service

2 participants