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
A limitation of Tegral DI compared to solutions that use a constructor-based approach to dependency injection is that it is not possible to instantiate Tegral DI components by just giving them the correct parameters. Tegral DI components are "polluted" with a scope: InjectionScope parameter.
Since Tegral DI components may be interlinked and intertwined in non-trivial ways, it is almost always better to just spin up a regular Tegral DI environment and add components this way.
If creating a DI environment is not possible, a workaround would be to implement a fake InjectionScope that would return from a list of hardcoded instances. This is only really useful in the case of having a single components that depends on several "non-polluted" classes that are trivial to instantiate.
The text was updated successfully, but these errors were encountered:
A limitation of Tegral DI compared to solutions that use a constructor-based approach to dependency injection is that it is not possible to instantiate Tegral DI components by just giving them the correct parameters. Tegral DI components are "polluted" with a
scope: InjectionScope
parameter.InjectionScope
that would return from a list of hardcoded instances. This is only really useful in the case of having a single components that depends on several "non-polluted" classes that are trivial to instantiate.The text was updated successfully, but these errors were encountered: