The code which uses IServiceCollection should be separated from Asp.Net Core. When you use StrongInject in places which already uses IServiceProvider and the whole GenericHost you might not want to have a dependency on Asp.Net Core. I would like to try StrongInject with Unity, using my DI extension Injecter, and having a dependency on Asp.Net core is a no-go. It might also be undesirable for Maui, WinUI, WPF, Avalonia or any other type of poject.
The code which uses
IServiceCollection
should be separated from Asp.Net Core. When you use StrongInject in places which already usesIServiceProvider
and the wholeGenericHost
you might not want to have a dependency on Asp.Net Core. I would like to try StrongInject with Unity, using my DI extension Injecter, and having a dependency on Asp.Net core is a no-go. It might also be undesirable for Maui, WinUI, WPF, Avalonia or any other type of poject.