class InternalDependencyContainer
implements DependencyContainer
import { InternalDependencyContainer } from "https://deno.land/x/alosaur@v0.24.1/src/injection/index.ts";
Dependency Container
Constructors
new
InternalDependencyContainer(parent?: InternalDependencyContainer)Properties
private
_registry: RegistryMethods
private
construct<T>(ctor: constructor<T> | DelayedConstructor<T>, context: ResolutionContext): Tprivate
getAllRegistrations<T>(token: InjectionToken<T>): Registration[] | nullprivate
getRegistration<T>(token: InjectionToken<T>): Registration | nullprivate
resolveParams<T>(context: ResolutionContext, ctor: constructor<T>)private
resolveRegistration<T>(registration: Registration, context: ResolutionContext): TclearInstances(): void
isRegistered<T>(token: InjectionToken<T>, recursive?): boolean
register<T>(token: InjectionToken<T>, provider: ValueProvider<T>): InternalDependencyContainer
Register a dependency provider.
register<T>(token: InjectionToken<T>, provider: FactoryProvider<T>): InternalDependencyContainer
registerInstance<T>(token: InjectionToken<T>, instance: T): InternalDependencyContainer
registerSingleton<T>(from: InjectionToken<T>, to: InjectionToken<T>): InternalDependencyContainer
registerSingleton<T>(token: constructor<T>, to?: constructor<any>): InternalDependencyContainer
registerType<T>(from: InjectionToken<T>, to: InjectionToken<T>): InternalDependencyContainer
reset(): void
resolve<T>(token: InjectionToken<T>, context?: ResolutionContext): T
resolveAll<T>(token: InjectionToken<T>, context?: ResolutionContext): T[]