Skip to content

Conversation

@jbogard
Copy link
Contributor

@jbogard jbogard commented Jul 17, 2020

Backed-out pull request: #34393
Previous pull request: dotnet/extensions#536
Original discussion: aspnet/DependencyInjection#471
Original pull request: aspnet/DependencyInjection#635
First naive pull request: aspnet/DependencyInjection#472

3rd 4th time's the charm?

All of the DI packages now support all of the specification tests added.

@ghost
Copy link

ghost commented Jul 17, 2020

Tagging subscribers to this area: @eerhardt, @maryamariyan
Notify danmosemsft if you want to be subscribed.

@maryamariyan
Copy link
Contributor

@jbogard
Copy link
Contributor Author

jbogard commented Jul 20, 2020

@maryamariyan fixed!

@jbogard
Copy link
Contributor Author

jbogard commented Jul 22, 2020

@maryamariyan Anything else needed from my end?

@maryamariyan
Copy link
Contributor

@maryamariyan Anything else needed from my end?

@jbogard the CI checks are green.

Let's wait on @davidfowl 's approval on this.

@dquist
Copy link

dquist commented Aug 13, 2020

bump

@davidfowl
Copy link
Member

Reviewing this now

… the generic type fails other than constraint failure
{
closedType = descriptor.ImplementationType.MakeGenericType(serviceType.GenericTypeArguments);
}
catch (ArgumentException)
Copy link
Member

Choose a reason for hiding this comment

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

This exception happens once per service type right? Will get try to create the service with the wrong generic arguments more than once per service type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, exactly once per closed service type. Once it's correctly resolved the CallSite (well, IEnumerableCallSite), that result is cached like any other created CallSite.

Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

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

LGTM, lets improve this in the future by solving #28033

@ghost
Copy link

ghost commented Aug 15, 2020

Hello @maryamariyan!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 2564f1a into dotnet:master Aug 15, 2020
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@jbogard jbogard deleted the ConstrainedOpenGenerics branch August 24, 2020 23:42
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants