Namespace Serenity.Global.Application.Validation
Classes
FoundationIdentityRules
Canonical identity rule every IFoundationSettings asset must satisfy: Id must be unique
within its own settings type (services resolve a definition by its Id, scoped to that type), and
Guid must be unique across ALL foundation assets (it is the cross-type serialization key). This
rule previously existed twice, independently: an ad hoc per-editor check in
FoundationEditor<T>.CheckGuid/FindDuplicateId (Unity-editor, scoped to one open
inspector) and a formal cross-project sweep in SerenityHealthCheckValidator (Unity-editor,
scans every asset) -- never in Domain, so a hand-written or recipe-imported asset with a colliding
id/guid was only ever caught by whichever editor tool happened to run. Both should delegate here so the
rule is defined exactly once and stays engine-agnostic (works over plain (id, guid, typeName) records,
no Unity types).
Structs
FoundationIdentityRules.IdentityRecord
A minimal identity record for one foundation asset: what the uniqueness rules need, nothing more.