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

Add IServiceProviderIsService to ServiceRegistry #355

Closed
wants to merge 1 commit into from

Conversation

halter73
Copy link

@halter73 halter73 commented Sep 29, 2022

@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 like IContainer implements IServiceProviderIsService.

We'll want to add tests, ifdef, and remove the dead code before merging this though.

@jeremydmiller
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants