using ScadaLink.Commons.Entities.Templates; namespace ScadaLink.TemplateEngine; /// /// Detects naming collisions across composed module members using canonical (path-qualified) names. /// Two members from different composed modules collide if they produce the same canonical name. /// Members from different module instance names cannot collide because the prefix differentiates them. /// public static class CollisionDetector { /// /// Represents a resolved member with its canonical name and origin. /// public sealed record ResolvedMember( string CanonicalName, string MemberType, // "Attribute", "Alarm", "Script" string OriginDescription); /// /// Detects naming collisions among all members (direct + composed) of a template. /// /// The template to check. /// All templates in the system (for resolving composed templates). /// List of collision descriptions. Empty if no collisions. public static IReadOnlyList DetectCollisions( Template template, IReadOnlyList