You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen other DI libraries with this and I do quite like it, it's just not been added before since I've not been sure on the best way to go about it. I do quite like using push[Lifetime] instead of just overloading add[Lifetime] (along with getMany instead of just an overloaded get), since it prevents any sort of misuse between single service and multi-service bindings.
I would also like for multi-service bindings to be supported with constructor and property injection. Following the separation between push and add, I think adding @InjectMany instead of overloading @Inject would be ideal. The new decorator could also be the canonical way of using multi-service injection in the constructor, so any parameters that don't have any decorator always use the single-injection mechanism (again, to prevent overloading).
If this seems reasonable I can look at adding this feature soon.
For example:
The text was updated successfully, but these errors were encountered: