Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CompositionContainer

A container, that composes instances.

Hierarchy

  • CompositionContainer

Implements

Index

Properties

Private _CATALOGS

_CATALOGS: ComposablePartCatalog[] = []

Private _instances

_instances: ExportInstance[] | symbol = VALUE_NOT_CREATED

Methods

addApplications

  • addApplications(...processes: Process[]): this
  • Adds one or more processes. If you process is defined, the current one is taken.

    Parameters

    • Rest ...processes: Process[]

    Returns this

addCatalogs

  • Adds one or more catalogs.

    Parameters

    Returns this

addClasses

  • addClasses(...classes: any[]): this
  • Adds one or more class (catalogs).

    Parameters

    • Rest ...classes: any[]

    Returns this

addDirectories

  • addDirectories(...dirs: string[]): this
  • Adds one or more directories.

    Parameters

    • Rest ...dirs: string[]

    Returns this

addFiles

  • addFiles(...files: string[]): this
  • Adds one or more files.

    Parameters

    • Rest ...files: string[]

    Returns this

addModules

  • addModules(...mods: any[]): this
  • Adds one or more module (catalogs).

    Parameters

    • Rest ...mods: any[]

    Returns this

compose

  • compose(...objs: any[]): Promise<void>
  • Composes all @Export() instances.

    Parameters

    • Rest ...objs: any[]

    Returns Promise<void>

composeSync

  • composeSync(...objs: any[]): this
  • Composes all @Export() instances.

    @param {any[]} [objs] One or more object, where to write the instances to.

    Parameters

    • Rest ...objs: any[]

    Returns this

dispose

  • dispose(): void
  • Frees all resources of that object.

    Returns void

Private fillInstances

  • fillInstances(instances: any[], classes: any[]): void
  • Parameters

    • instances: any[]
    • classes: any[]

    Returns void

Private fillMatchingExports

getAllServices

  • getAllServices<TService>(service: ServiceKey): Promise<TService[]>
  • Returns all services by key.

    Type parameters

    • TService

    Parameters

    Returns Promise<TService[]>

    The promise with the services.

Private getAllServicesInner

  • Parameters

    Returns any[]

getAllServicesSync

  • getAllServicesSync<TService>(service: ServiceKey): TService[]
  • Returns all services by key.

    Type parameters

    • TService

    Parameters

    Returns TService[]

    The services.

Private getGlobalExportInstances

Private getGlobalExportInstancesSync

getService

  • getService<TService>(service: ServiceKey): Promise<TService>
  • Returns a single service by key.

    Type parameters

    • TService

    Parameters

    Returns Promise<TService>

    The promise with the single service.

Private getServiceInner

  • Parameters

    Returns any

getServiceSync

  • getServiceSync<TService>(service: ServiceKey): TService
  • Returns a single service by key.

    Type parameters

    • TService

    Parameters

    Returns TService

    The single service.

Private handleDecoratorsOfObjectList

  • handleDecoratorsOfObjectList(objects: any[]): void
  • Parameters

    • objects: any[]

    Returns void

Private handleImportManys

  • handleImportManys(obj: any): void
  • Parameters

    • obj: any

    Returns void

Private handleImports

  • handleImports(obj: any): void
  • Parameters

    • obj: any

    Returns void

Generated using TypeDoc