Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mandarinets/main-core/dependency-injection/diFactory.ts>DependencyInjectionFactory

Mandarine.TS is a typescript, decorator-driven framework that allows you to create server-side applications. Mandarine.TS provides a range of built-in solutions such as Dependency Injection, Components, ORM and more. Under its umbrella, Mandarine.TS has 4 modules: Core, Data, Security and MVC, these modules will offer you the requirements to build a Mandarine-powered application.
Latest
class DependencyInjectionFactory
import { DependencyInjectionFactory } from "https://deno.land/x/mandarinets@v2.3.2/main-core/dependency-injection/diFactory.ts";

Methods

Resolves all the dependencies a component has (Fields and constructor). Note MANUAL_COMPONENTS are not resolved since they were theorically resolved by the user.

constructorResolver<T>(componentSource: Mandarine.MandarineCore.ComponentRegistryContext, componentRegistry: Mandarine.MandarineCore.IComponentsRegistry): T | undefined

Resolve dependencies from a component's constructor. This method will look for the requested dependencies in the DI Container at mandarine compile time.

Get component of dependency by Type

getComponentsByComponentType<T>(type: Mandarine.MandarineCore.ComponentTypes): Array<T>

Get component of dependency by component type

Get a Dependency from the DI Container programatically

Get a Dependency from the DI Container programatically

Get a Dependency from the DI Container programatically

methodArgumentResolver(
object: any,
methodName: string,
context: Mandarine.Types.RequestContext,
)

Resolves all the requested data by a HTTP Handler method. This function is used when requests are received