-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Keyed Services Support? 🤔 #596
Comments
The problem here is a little bit more complicated than it might seem at first glance. It ain't pretty,but it has worked up until now where MS.DI itself has started to support keyed services. Then those "hacks" would no longer work in all cases and the adapter breaks down. So to fix this I've started to do some changes to LightInject itself to better adapt to MS.DI without using LightInject's named services as a way to be compatible with MS.DI. I've started this work some time ago, but since nobody has asked for it yet , I pretty much left it on the shelf knowing that I would have to pick up on it eventually. I guess that time is now. But just as you know, there is no easy fix here that can be solved in the adapter. Changes has to be made in LightInject to accommodate this. |
We probably end up with a new option in LightInject. |
That sounds awesome @seesharper thank you for taking the time to comment and inform. I have to admit I am doing double-takes here because I am now shaking my head that "hey! DI has always had named services." ... 🤔 So these keyed services are different? I am so confused. 😅 I am of course more than happy to help test any new features that help address this problem. As I mentioned in the other thread an error is thrown currently but soon it will be null and that might lead to other issues. |
Hi @Mike-E-angelo . Just wanted to let you know that I have been working on this quite a lot the last couple of weeks. I have all the spec tests from MS working now. Still some cleanup needed, but we're getting there. Should be ready by the time .net 9 goes RTM 👍🙂 |
That's awesome @seesharper! Thank you so very much for all your efforts out there. 🙏 |
Thanks a lot for sponsoring me. 🤩. Really appreciate it. |
Right back atcha @seesharper ... thank you for being so responsive and engaging with your product. It has been fundamental and utilized by my framework for many years and is the least I can do. 🙏 |
@Mike-E-angelo Hi Mike. Just wanted to give you an update on the progress here. |
Awesome @seesharper thank you very much for the update. For your awareness, the project I was working that was using Aspire (where I ran into this issue) has been put on hold for now, so this is not a rush/priority at the moment, but it would of course be great to have it there when I need it. 😊🙏 I appreciate all your work out there and wish a great weekend for you as well. 👍 |
Hi @Mike-E-angelo The new packages are
Technically there are no breaking changes in these versions, but I decided to bump the major anyway 🙂 Again thanks for your sponsor contribution and for the encouragement ❤️ |
That's really awesome @seesharper! Thank you again so very much for this. This will be very useful going forward to onboard the new tech such as Aspire which is using this feature. 🙏 I greatly appreciate all your efforts out there. 👍✨ |
This issue piggybacks on this one:
seesharper/LightInject.Microsoft.DependencyInjection#210
I am beginning to wonder... is this a bigger problem? Does LightInject need to support Keyed Services? 🤔
The text was updated successfully, but these errors were encountered: