Used by ValueHostManager.startModifying() function to modify the ValueHostsManagerConfig.valueHostConfigs array. It does not change the original until you call its apply() function. Apply() makes its updates through ValueHostsManager.addOrMergeValueHost().

Remarks

The baseConfig object is setup with the existing ValueHostConfigs from the originating manager. Then an override is added to the overriddenValueHostConfigs, which will be modified as ValueHostConfigs are added. The existingValueHostConfigs are never modified directly. The overridden ones are used to replace them later.

Type Parameters

Hierarchy (view full)

Implements

Constructors

Accessors

  • get baseConfig(): T
  • The initial setup from the constructor and assigned ValueHostConfigs until an OverrideConfig is added. It always retains the official services and callbacks. Merging overrides updates this object.

    Returns T

Methods

  • Fluent format to create any ValueHostConfig based upon ValidatorsValueHostBaseConfig. This is the start of a fluent series. Extend series with validation rules like "required()". Protected because ValueHostManager does not support InputValueHost. ValidationManager offers a public interface.

    Type Parameters

    Parameters

    • valueHostType: string

      the ValueHostType to configure

    • arg1: string | Partial<TVHConfig>

      either the ValueHost name for a multiparameter use or InputValueConfig for a single parameter use.

    • Optional arg2: null | string | Partial<TVHConfig>

      optional and can be null. The value for ValueHost.dataType or InputValueHostConfig.

    • Optional arg3: Partial<TVHConfig>

      optional. Any additional properties of a InputValueHostConfig.

    Returns FluentValidatorBuilder

    FluentValidatorBuilder for chaining validators to initial InputValueHost

  • Combines a condition with a ValidatorConfig's condition using a rule supplied or callback to let you create a conditionConfig.

    The resulting ValidatorConfig's errorCode will not have changed from the original to ensure it aligns with everything depending on the original error code.

    Parameters

    • destinationOfCondition: ValidatorConfig

      the conditionConfig that you want to combine with the new condition.

    • arg2: CombineUsingCondition | ((combiningBuilder, existingConditionConfig) => void)

      Either of these:

      • Use a function to create a conditionConfig that will replace the existing. You are passed the Builder object, where you can build your new conditions, and the existing conditionConfig, which can be added to a Builder object with the conditionConfig() function.
      • a CombineUsingCondition enum value that specifies how to combine the conditions.
    • Optional arg3: ((combiningBuilder) => void)

      create the condition that you want to combine with the existing condition.

    Returns void

  • Updates the conditionConfig property of destinationOfCondition where the replacement is either a conditionConfig or using a Builder object.

    If it finds the validator with the errorcode specified, it will replace the condition with the existing condition. If not, it logs and throws an error. If the ValueHost is on an earlier override or baseConfig, a new entry is made in the current override, reflecting the same data as earlier, but now with a modified validator. If the ValueHost is on the current override, the existing entry is modified.

    The resulting ValidatorConfig's errorCode will not have changed from the original to ensure it aligns with everything depending on the original error code.

    Parameters

    • destinationOfCondition: ValidatorConfig
    • sourceOfConditionConfig: ConditionConfig | ((replacementBuilder) => void)

      Either of these:

      • use a function to create a conditionConfig that will replace the existing. You are passed the builder, where you can build your new conditions.
      • provide a complete ConditionConfig as the replacement

    Returns void

  • Completes the process by using ValueHostManager.addOrMergeValueHost() on each entry supplied. That function internally uses ValueHostsConfigMergeService when the ValueHost exists. After this function completes, this instance has been disposed (via dispose() function) and the instance should not be used further. Any reference to a ValueHost instance that you have must be abandoned and a fresh instance retrieved, as your reference was disposed.

    Returns void

Generated using TypeDoc v0.25.12