logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SerenityHubValidationRunnerRegistry

    Registration seam for a project validator whose assembly the Hub cannot reference (design ADR-1, mirrored from SerenityHubStatusRowRegistry — e.g. the Localization editor assembly references this one, never the reverse). A registering assembly's own [InitializeOnLoad] static constructor calls Register(string, Action<SerenityValidationReport>) on every domain reload; registration is idempotent per validator id so that rerun never accumulates duplicate entries, and RegisteredValidatorIds keeps first-registration order so the set a report describes reads the same on every domain load. This dictionary is process state that survives every domain reload once populated — the same contract SerenityHubViewRegistry carries. SerenityProjectValidationRunner resolves through TryGet(string, out Action<SerenityValidationReport>) and skips a validator that never registered rather than throwing.

    Inheritance
    object
    SerenityHubValidationRunnerRegistry
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Hub.Infrastructure.Editor
    Assembly: Serenity.UnityHub.Infrastructure.Editor.dll
    Syntax
    public static class SerenityHubValidationRunnerRegistry

    Fields

    LocalizationKeysValidatorId

    Id the Localization editor assembly registers its key validator under. Spelled out rather than read from SerenityLocalizationKeyValidator.ValidatorName: the Hub does not reference that assembly — that reference is exactly what this seam exists to break — and the string is the published contract anyway, the same word the -validationKind vocabulary, the Hub's Localization Keys report group and the report's validator field all carry. Changing it there must fail here.

    Declaration
    public const string LocalizationKeysValidatorId = "localizationKeys"
    Field Value
    Type Description
    string

    Properties

    RegisteredValidatorIds

    Declaration
    public static IReadOnlyList<string> RegisteredValidatorIds { get; }
    Property Value
    Type Description
    IReadOnlyList<string>

    Every registered validator id, in the order it was first registered.

    Methods

    Register(string, Action<SerenityValidationReport>)

    Declaration
    public static void Register(string validatorId, Action<SerenityValidationReport> run)
    Parameters
    Type Name Description
    string validatorId
    Action<SerenityValidationReport> run

    TryGet(string, out Action<SerenityValidationReport>)

    Declaration
    public static bool TryGet(string validatorId, out Action<SerenityValidationReport> run)
    Parameters
    Type Name Description
    string validatorId
    Action<SerenityValidationReport> run
    Returns
    Type Description
    bool
    In this article
    © 2026 Serenity. All Rights Reserved