An implementation of the IServiceManager interface.

Properties

_serviceManager: ServiceManager

Methods

  • Clears the service.

    Returns void

    Returns nothing.

    SomeClass

    clear

  • Disable UML log collection. Increase performance on production

    Returns void

  • Injects a dependency using the given key and returns an instance of the dependency.

    Type Parameters

    • T = object

      The type of the dependency being injected.

    Parameters

    • key: Key

      The key used to locate the dependency.

    • Optionalverbose: boolean = true

      A flag indicating whether verbose logging should be enabled (default is true).

    Returns T

    • An instance of the dependency.
  • Prefetches data using the _serviceManager.prefetch method.

    Parameters

    • Optionalverbose: boolean = true

      Specifies whether to enable verbose mode.

    Returns Promise<void>

    • A promise that resolves when the prefetching is complete.
  • Registers a creator function for a given key.

    Type Parameters

    • T = object

    Parameters

    • key: Key

      The key to associate with the creator function.

    • ctor: (() => T | Promise<T>)

      The creator function that returns the desired object or a promise resolving to the desired object.

        • (): T | Promise<T>
        • Returns T | Promise<T>

    Returns void

  • Registers an instance with the service manager.

    Type Parameters

    • T = object

    Parameters

    • key: Key

      The key for the registered instance.

    • inst: T

      The instance to be registered.

    Returns void

  • Converts a resolution tree to a YAML UML representation. Prints the UML representation to the console and returns it as a string.

    Returns string

    The YAML UML representation of the resolution tree.

  • Unloads a resource using the _serviceManager.

    Parameters

    • Optionalverbose: boolean = true

      Whether to output verbose information. Default value is true.

    Returns Promise<void>

    • A promise that resolves when the resource is unloaded.
  • Wait for the service to be provided.

    Parameters

    • verbose: boolean = true

      Whether to output verbose logs.

    Returns Promise<void>

    • A promise that resolves when the service is provided.