Skip to content

Dependency Injection

Nill edited this page Dec 11, 2021 · 7 revisions

Telefrag DI

Telefrag uses a powerful custom-built dependency injection system meant to make rapid development seamless and puzzle-free.

  • Containers hold components and are responsible for their registration, resolution, and lifetime.
  • Components are the dependencies (a.k.a. "services") that are registered and can then subsequently be resolved or injected.
  • A Registration determines how a component is retrieved when it is needed, and which component instances are active for a given type/name.
  • A Lifetime determines how long an injected/resolved instance is active until a new one is generated/created.

Microsoft DI / ASP.NET

Telefrag also provides extension methods to assist with registering Telefrag as a Service in Microsoft's service container.

See ASP.NET for more information about registering Telefrag in Microsoft's dependency injection ecosystem.

Clone this wiki locally