Dependence Injection Uncoupled

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)

injection-net8.png

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[])

--

Injection_Dependence_class.png

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

--
Injection_Dependence_config_service.png

Cors, routers and polity

The class also provides management of cors, routes, application initial settings and endpoints.