-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Dependency Injection support for ValueTypes as Services #59625
Conversation
Tagging subscribers to this area: @eerhardt, @maryamariyan Issue DetailsWe only thing missing to support ValueTypes as Services I am also fixing several tests that were building the ServiceProvider
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some suggestions, seems good otherwise.
...s/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs
Outdated
Show resolved
Hide resolved
...s/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs
Outdated
Show resolved
Hide resolved
...s/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs
Outdated
Show resolved
Hide resolved
...s/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs
Outdated
Show resolved
Hide resolved
...s/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs
Outdated
Show resolved
Hide resolved
...s/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/ILEmit/ILEmitResolverBuilder.cs
Outdated
Show resolved
Hide resolved
...ies/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderContainerTests.cs
Show resolved
Hide resolved
...ies/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderContainerTests.cs
Outdated
Show resolved
Hide resolved
The only that was thing missing to support ValueTypes as Services was box the result when visiting constructors call sites. I am also fixing several tests that were building the ServiceProvider using the default engine, instead of relying on each specific engine. fix dotnet#42160
371fa99
to
8ff63c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great work here, @allantargino. And thanks for separating the changes. It makes it much easier to review.
Thank you @eerhardt for the reviews and best practices recommendations, I am learning a ton 👍 |
The only thing that was missing to support ValueTypes as Services was box the result when visiting constructors call sites.
I am also fixing several tests that were building the ServiceProvider using the default ServiceProviderEngine, instead of relying on each specific engine abstract creation method.
fix #42160