Closed halter73 closed 1 year ago
@halter73 Sorry, just saw this. Lamar has supported IServiceProviderIsService
in .NET 6 and above for quite awhile. Not sure what you're seeing here. There are tests passing in the codebase for the implied method injection w/ Minimal API as well.
@maryamariyan was showing me this code because it looks like
IServiceProviderIsService
isn't being properly registered in the ServiceRegistry. I'm not sure this works, but it should be closer to working. I copied(IServiceProviderIsService)s.GetRequiredService<IContainer>()
from https://github.com/JasperFx/lamar/blob/v8.0.1/src/Lamar.Microsoft.DependencyInjection/HostBuilderExtensions.cs#L90 but it doesn't look likeIContainer
implementsIServiceProviderIsService
.We'll want to add tests, ifdef, and remove the dead code before merging this though.