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
Currently, when you want to inject all services with a specific tag you have to write your own compiler pass as described here. Additionally, one has to use method calls instead of injecting the services into the constructor because obviously the parameter cannot be inferred.
It would be handy if there was a way to inject all services that are tagged with a specific tag, optimally indexed by their id:
The @= will not work because the DI component needs to know the dependencies beforehand to do topological sorting. I wouldn't know what other syntax to use though.
Closing as duplicate of #12269, seems like you're not alone :)
Please consider looking at it and the relevant PR #22200 to discuss implementation details.
Currently, when you want to inject all services with a specific tag you have to write your own compiler pass as described here. Additionally, one has to use method calls instead of injecting the services into the constructor because obviously the parameter cannot be inferred.
It would be handy if there was a way to inject all services that are tagged with a specific tag, optimally indexed by their id:
Resulting in:
This is probably not an everyday use-case but maybe other people would be interested in this.
The text was updated successfully, but these errors were encountered: