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

Dependency Injection support for ValueTypes as Services #59625

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

allantargino
Copy link
Contributor

@allantargino allantargino commented Sep 26, 2021

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

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Sep 26, 2021
@ghost
Copy link

ghost commented Sep 26, 2021

Tagging subscribers to this area: @eerhardt, @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details

We only thing missing to support ValueTypes as Services
were 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 #42160
fix #59624

Author: allantargino
Assignees: -
Labels:

area-Extensions-DependencyInjection

Milestone: -

Copy link
Contributor

@teo-tsirpanis teo-tsirpanis left a 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.

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
Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

:shipit: Thanks for the great work here, @allantargino. And thanks for separating the changes. It makes it much easier to review.

@eerhardt eerhardt merged commit 52d46c9 into dotnet:main Sep 28, 2021
@allantargino
Copy link
Contributor Author

Thank you @eerhardt for the reviews and best practices recommendations, I am learning a ton 👍

@allantargino allantargino deleted the issue-42160 branch September 29, 2021 12:06
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Extensions-DependencyInjection community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DependencyInjection doesn't support value type services
3 participants