跳到主要内容
版本:Next

IMidwayGlobalContainer

Abstract Object Factory 对象容器抽象

Hierarchy

Implemented by

Index

Properties

identifierMapping

identifierMapping: IIdentifierRelationShip

objectCreateEventTarget

objectCreateEventTarget: EventEmitter<DefaultEventMap>

registry

Methods

addNamespace

  • addNamespace(namespace: string): void

bind

  • Type parameters

    • T

bindClass

get

  • get<T>(identifier: string | ClassType<T>, args?: any[]): T
  • Type parameters

    • T

getAsync

  • getAsync<T>(identifier: string | ClassType<T>, args?: any[]): Promise<T>
  • Type parameters

    • T

getAttr

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


    Type parameters

    • T

getDefinition

getIdentifier

  • getIdentifier(identifier: string | ClassType<any>): string
  • Get IoC identifier

getInstanceScope

  • Get instance IoC container scope

getManagedResolverFactory

  • getManagedResolverFactory(): ManagedResolverFactory

getNamespaceList

  • getNamespaceList(): string[]

getObject

  • Type parameters

    • T

hasDefinition

hasNamespace

  • hasNamespace(namespace: string): boolean

hasObject

onBeforeBind

onBeforeObjectCreated

onBeforeObjectDestroy

onObjectCreated

  • onObjectCreated(fn: (...args: [ins: unknown, options: ObjectCreatedOptions<unknown>]) => void): void

onObjectInit

  • onObjectInit(fn: (...args: [ins: unknown, options: ObjectInitOptions]) => void): void

registerObject

removeObject

setAttr

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

stop

  • stop(): Promise<void>