Single Responsibility
Using the principles of S.O.L.I.D, dependency injection is an independent service, with sole responsibility, managing standard dependencies for specific projects.
Being of single responsibility, any application can communicate with the service (D.I), maintaining high well-defined cohesion
Project (namespace: gt.ui.injection.microsoft)
Configuration dependence
The management of dependency injections is done differently for service applications and presentation applications (UI).
This distinction favors both performance and good practices, applying only references used
Method InjectionMain()
The behavior of presentation applications (UI) or (API) has its differences, therefore not necessarily both consist of the same libraries (namespaces), however their responsibilities can be measured when executing the method InjectionMain(args[])
--
Builder.Services
The configuration of dependency injection services is basically added in the Service(...) method. Applications that need dependencies are added depending on the DependenceInjection.App.API or WebSingle application type
--
Cors, routers and polity
The class also provides management of cors, routes, application initial settings and endpoints.