Skip to content
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

Properties injection for services that are declared in-code #1

Open
VitaliyMF opened this issue Dec 13, 2023 · 0 comments
Open

Properties injection for services that are declared in-code #1

VitaliyMF opened this issue Dec 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@VitaliyMF
Copy link
Contributor

Currently properties marked with [Dependency] attribute are automatically resolved (by-type) for components defined in JSON config and if ComponentDescriptor.InjectDependencyAttr=true.

It might be useful to perform properties injections for services that are already registered in IServiceCollection. This can be implemented as an extension method like services.InjectDependencyProperties() that scans existing ServiceDescriptor declarations, and if it finds a type that has properties with [Dependency] attribute, replaces this service definition with handler that performs injections for these properties.

@VitaliyMF VitaliyMF added the enhancement New feature or request label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant