using ScadaLink.Commons.Entities.Templates; namespace ScadaLink.TemplateEngine; /// /// Detects cycles in template inheritance and composition graphs. /// Covers: self-inheritance, circular inheritance chains, self-composition, /// circular composition chains, and cross-graph (inheritance + composition) cycles. /// public static class CycleDetector { /// /// Checks whether setting as the parent of template /// would introduce an inheritance cycle. /// /// A description of the cycle if one would be created, or null if safe. public static string? DetectInheritanceCycle( int templateId, int parentId, IReadOnlyList