Skip to content

Commit 837bd58

Browse files
dahlbykdustinsoftware
authored andcommitted
Remove redundant generic check
1 parent 83c77e2 commit 837bd58

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/StructureMap.Microsoft.DependencyInjection/StructureMapServiceProviderIsService.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@ public bool IsService(Type serviceType)
2929
return true;
3030
}
3131

32-
3332
if (serviceType.IsConstructedGenericType && serviceType.GetGenericTypeDefinition() is Type genericDefinition)
3433
{
3534
// We special case IEnumerable since it isn't explicitly registered in the container
3635
// yet we can manifest instances of it when requested.
37-
return genericDefinition == typeof(IEnumerable<>) ||
38-
_container.Model.HasDefaultImplementationFor(genericDefinition);
36+
return genericDefinition == typeof(IEnumerable<>);
3937
}
4038

4139
return false;

0 commit comments

Comments
 (0)