Orderly SDKs / Modules / @orderly.network/core / SimpleDI

Class: SimpleDI

@orderly.network/core.SimpleDI

Table of contents

Constructors

Properties

Methods

Constructors

constructor

Private new SimpleDI()

Defined in

packages/core/src/di/simpleDI.ts:50

Properties

KEY

Private Static KEY: string = "__ORDERLY_CONTAINER__"

Defined in

packages/core/src/di/simpleDI.ts:6


container

Private Static container: Container

Defined in

packages/core/src/di/simpleDI.ts:7

Methods

get

Static get<T>(name): T

Type parameters

NameType
Tany

Parameters

NameType
namestring

Returns

T

Defined in

packages/core/src/di/simpleDI.ts:30


getAll

Static getAll(): Object

Returns

Object

Defined in

packages/core/src/di/simpleDI.ts:46


getContainer

Private Static getContainer(): Container

Returns

Container

Defined in

packages/core/src/di/simpleDI.ts:10


getOr

Static getOr<T>(name, instance): T

Type parameters

NameType
Tany

Parameters

NameType
namestring
instanceT

Returns

T

Defined in

packages/core/src/di/simpleDI.ts:34


register

Static register(...serviceClasses): void

Parameters

NameType
...serviceClassesany[]

Returns

void

Defined in

packages/core/src/di/simpleDI.ts:18


registerByName

Static registerByName(name, serviceClass): void

Parameters

NameType
namestring
serviceClassany

Returns

void

Defined in

packages/core/src/di/simpleDI.ts:22