Aller au contenu principal
Version: Next

MidwayRequestContainer

Abstract Object Factory 对象容器抽象

Hierarchy

Index

Constructors

constructor

Properties

publicparent

parent: IMidwayContainer = null

Accessors

identifierMapping

managedResolverFactory

  • get managedResolverFactory(): ManagedResolverFactory

namespaceSet

  • get namespaceSet(): Set<string>

objectCreateEventTarget

  • get objectCreateEventTarget(): EventEmitter<DefaultEventMap>

registry

Methods

bind

  • Type parameters

    • T

bindClass

createChild

get

  • get<T>(identifier: any, args?: any): T
  • Type parameters

    • T = any

getAsync

  • getAsync<T>(identifier: any, args?: any): Promise<T>
  • Type parameters

    • T = any

publicgetAttr

  • getAttr<T>(key: string): T
  • Get value from app attribute map


    Type parameters

    • T

getContext

  • getContext(): { _MAIN_CTX_: boolean }

getInstanceScope

  • Get instance IoC container scope

getNamespaceList

  • getNamespaceList(): string[]

hasDefinition

hasNamespace

  • hasNamespace(ns: string): boolean

hasObject

init

  • init(): void

listModule

  • listModule(key: string): unknown[]

load

  • load(module: any): void

onBeforeBind

onBeforeObjectCreated

onBeforeObjectDestroy

  • Type parameters

    • T

onObjectCreated

  • Type parameters

    • T

onObjectInit

  • Type parameters

    • T

ready

  • ready(): Promise<void>

registerObject

  • proxy registry.registerObject

saveModule

  • saveModule(key: any, module: any): void

publicsetAttr

  • setAttr(key: string, value: any): void
  • Set value to app attribute map

setFileDetector

stop

  • stop(): Promise<void>

transformModule

  • transformModule(moduleMap: Map<string, Set<any>>): void