-
Notifications
You must be signed in to change notification settings - Fork 5k
Fix missing ServiceCallSite.Key causing an unkeyed cache entry to be overwritten by a keyed instance #113343
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
Fix missing ServiceCallSite.Key causing an unkeyed cache entry to be overwritten by a keyed instance #113343
Conversation
…overwritten by a keyed instance
...rosoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderServiceExtensionsTest.cs
Outdated
Show resolved
Hide resolved
I feel that ServiceProviderExtensionsTest might not be the best class to contain the new tests, because they are intended to test the service container itself rather than the extension methods. |
Perhaps the class |
@KalleOlaviNiemitalo, @steveharter, that's a good point, thanks. I moved the new tests to the |
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.
Thanks for fixing this.
Glad I could help and make .NET a bit better! |
Fix missing
ServiceCallSite.Key
causing an unkeyed cache entry to be overwritten by a keyed instance when usingDynamicServiceProviderEngine
and cover all cases (Generic (TryCreateOpenGeneric) and Enumerable (TryCreateEnumerable) and the basic one (TryCreateExact) ) with unit tests.Fixes #111795