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
At the moment, dependency injection is designed for UIComponents. It can be used with other types, but it is very tedious. The following should be as easy as possible to implement:
// interfaces are omitted for brevitypublicclassMySecondDependency{/* code */}[Dependency(typeof(IMySecondDependency), provide:typeof(MySecondDependency))]publicclassMyFirstDependency{/* code */}[Dependency(typeof(IMyFirstDependency), provide:typeof(MyFirstDependency))]publicclassMyComponent:UIComponent{/* code */}
One possible approach would be to introduce a new class that could be inherited from. It would contain the minimum code needed to get dependency injection working.
Furthermore, TestBed should be modified to work with all dependency consumers.
Don't require Logger with dependency injection
Create subclass for DI consumers
Look into DI without interfaces
Rework TestBed to accept non-UIComponent types
Update documentation
The text was updated successfully, but these errors were encountered:
At the moment, dependency injection is designed for UIComponents. It can be used with other types, but it is very tedious. The following should be as easy as possible to implement:
One possible approach would be to introduce a new class that could be inherited from. It would contain the minimum code needed to get dependency injection working.
Furthermore,
TestBed
should be modified to work with all dependency consumers.Logger
with dependency injectionTestBed
to accept non-UIComponent typesThe text was updated successfully, but these errors were encountered: