Skip to main content
Module

x/alosaur/mod.ts>InternalDependencyContainer

Alosaur - Deno web framework with many decorators
Very Popular
Go to Latest
class InternalDependencyContainer
import { InternalDependencyContainer } from "https://deno.land/x/alosaur@v0.35.2/mod.ts";

Dependency Container

Constructors

new
InternalDependencyContainer(parent?: InternalDependencyContainer)

Properties

private
_registry: Registry

Methods

private
construct<T>(ctor: constructor<T> | DelayedConstructor<T>, context: ResolutionContext): T
private
getAllRegistrations<T>(token: InjectionToken<T>): Registration[] | null
private
getRegistration<T>(token: InjectionToken<T>): Registration | null
private
resolveParams<T>(context: ResolutionContext, ctor: constructor<T>)
private
resolveRegistration<T>(registration: Registration, context: ResolutionContext): T
isRegistered<T>(token: InjectionToken<T>, recursive?): boolean

Register a dependency provider.

register<T>(
token: InjectionToken<T>,
provider: constructor<T>,
): InternalDependencyContainer
registerSingleton<T>(token: constructor<T>, to?: constructor<any>): InternalDependencyContainer

Uses only set immmediataly onlu uses in Alosaur

reset(): void
resolve<T>(token: InjectionToken<T>, context?: ResolutionContext): T
resolveAll<T>(token: InjectionToken<T>, context?: ResolutionContext): T[]