-
Notifications
You must be signed in to change notification settings - Fork 312
Fix mixed open and close generic service IEnumerable resolution #530
Conversation
Before:
After:
|
return null; | ||
} | ||
|
||
private IServiceCallSite ApplyScope(IServiceCallSite serviceCallSite, ServiceLifetime descriptorLifetime) |
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.
Change the name to ApplyLifetime, Scope has another meaning
Validate(descriptors); | ||
} | ||
|
||
private void Validate(IEnumerable<ServiceDescriptor> descriptors) |
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.
static?
@@ -680,5 +680,29 @@ public void DisposesInReverseOrderOfCreation() | |||
Assert.Equal(outer.MultipleServices.Reverse(), callback.Disposed.Skip(1).Take(3).OfType<IFakeMultipleService>()); | |||
Assert.Equal(outer.SingleService, callback.Disposed[4]); | |||
} | |||
|
|||
[Fact] | |||
public void ResolvesMixedOpenClosedGenericsAsEnumerable() |
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.
/cc @khellang this test fails on StructureMap
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.
Yep. That was expected (#500 (comment)). I'll see if I can do some magic internally to get it to work.
|
||
namespace Microsoft.Extensions.DependencyInjection.ServiceLookup | ||
{ | ||
internal class FactoryService : IService, IServiceCallSite | ||
internal class FactoryService : IServiceCallSite |
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.
FactoryCallsite
Fixes: #500