Supplies services and factories to be used as dependency injection into the classes of this system. Extends the Services class to provide properties for several common services.

Hierarchy (view full)

Implements

Constructors

Accessors

  • get lookupKeyFallbackService(): ILookupKeyFallbackService
  • Service for creating a relationship between a lookup key and another that is the base data type it is built around. For example, LookupKey.Integer uses a number as the base data type. So it has a relationship with LookupKey.Number. This service keeps these relationships. The DataTypeFormatterService and DataTypeParserService consume this as they try to find the best fitting Formatter or Parser. So go ahead and assign your ValueHost.datatype to LookupKey.Integer. If there is no IntegerParser (there isn't), expect to be using the NumberParser.

    Returns ILookupKeyFallbackService

  • set lookupKeyFallbackService(service): void
  • Service for creating a relationship between a lookup key and another that is the base data type it is built around. For example, LookupKey.Integer uses a number as the base data type. So it has a relationship with LookupKey.Number. This service keeps these relationships. The DataTypeFormatterService and DataTypeParserService consume this as they try to find the best fitting Formatter or Parser. So go ahead and assign your ValueHost.datatype to LookupKey.Integer. If there is no IntegerParser (there isn't), expect to be using the NumberParser.

    Parameters

    Returns void

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