Difference between revisions of "Dependency Injection"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "This page documents the Dependency Injection (DI) of the application, or how each class's dependencies(services, etc) are loaded automagically. This document is intended to de...")
 
(Service DI)
Line 9: Line 9:
  
 
== Dependency Injection ==
 
== Dependency Injection ==
 +
 +
==== Services ====
 +
 +
:Services can be found in
 +
    \Truxton\Client\Libraries\TruxtonClient.Services
 +
 +
:They'll need a matching Interface for DI to work. Interfaces can be found in
 +
    \Truxton\Client\Libraries\TruxtonClient.Services\Interfaces
 +
 +
:Once the service and interface are created, they need to be registered in <b>ServiceRegistrar.cs</b>
 +
    \Truxton\Client\TruxtonClient\TruxtonClient\PresentationCore\ServiceRegistrar.cs

Revision as of 11:46, 3 November 2021

This page documents the Dependency Injection (DI) of the application, or how each class's dependencies(services, etc) are loaded automagically. This document is intended to detail the references and flow of the DI used in the UI.

UI Guide Menu

  1. Entry Point
  2. Navigation and Routing
  3. Databinding
  4. Dependency Injection

Dependency Injection

Services

Services can be found in
   \Truxton\Client\Libraries\TruxtonClient.Services
They'll need a matching Interface for DI to work. Interfaces can be found in
   \Truxton\Client\Libraries\TruxtonClient.Services\Interfaces
Once the service and interface are created, they need to be registered in ServiceRegistrar.cs
   \Truxton\Client\TruxtonClient\TruxtonClient\PresentationCore\ServiceRegistrar.cs