Supplies services and factories to be used as dependency injection into the classes of this system.

Hierarchy (view full)

Implements

Constructors

Methods

  • Returns the service by its name identifier. Returns null if the name identifier is unregistered.

    Type Parameters

    • T

    Parameters

    • serviceName: string

      Will be a case insensitive match

    Returns null | T

    Remarks

    Do not keep a reference to a service elsewhere, unless it is a WeakRef. Expectation is the instance is owned by the Services object, and it will handle disposal.

  • Adds or replaces a service. If the supplied service implements IServicesAccessor, its own services property is assigned to this ValidationServices instance.

    Parameters

    • serviceName: string

      name that identifies this service and will be used in getService().

    • service: any

      the service. It can be a class, object, or primitive. Will be a case insensitive match

    Returns void

  • If the user needs to abandon this instance, they should use this to clean up active resources (like timers) and to release memory that would stall the garbage collector from disposing this object. It should assign any object reference to undefined as a strong indicator that the object has been disposed.

    Returns void

Generated using TypeDoc v0.25.12