namespace ZB.MOM.WW.ScadaBridge.ScriptAnalysis; /// /// M3.1: a compile-only mirror of the SiteRuntime /// TriggerExpressionGlobals bind surface. A trigger expression is a bare /// boolean expression referencing Attributes["x"] / Children["c"] /// / Parent; the design-time deploy gate (M3.5) compiles candidate /// trigger expressions against this type to catch undefined symbols. /// /// /// Only the read-only bind surface is reproduced — the runtime /// ExtractExpression helper and the snapshot-backed constructor are /// intentionally omitted; they are runtime concerns, not part of what an /// expression binds against. Member bodies are compile-only and throw /// . /// /// public sealed class TriggerCompileSurface { private const string CompileOnly = "compile-only surface"; /// Mirrors TriggerExpressionGlobals.Attributes. public ReadOnlyAttributes Attributes => throw new NotSupportedException(CompileOnly); /// Mirrors TriggerExpressionGlobals.Children. public ReadOnlyChildren Children => throw new NotSupportedException(CompileOnly); /// Mirrors TriggerExpressionGlobals.Parent. public ReadOnlyComposition? Parent => throw new NotSupportedException(CompileOnly); /// Compile-only mirror of TriggerExpressionGlobals.ReadOnlyAttributes. public sealed class ReadOnlyAttributes { /// Mirrors ReadOnlyAttributes.this[string]. public object? this[string key] => throw new NotSupportedException(CompileOnly); } /// Compile-only mirror of TriggerExpressionGlobals.ReadOnlyComposition. public sealed class ReadOnlyComposition { /// Mirrors ReadOnlyComposition.Attributes. public ReadOnlyAttributes Attributes => throw new NotSupportedException(CompileOnly); } /// Compile-only mirror of TriggerExpressionGlobals.ReadOnlyChildren. public sealed class ReadOnlyChildren { /// Mirrors ReadOnlyChildren.this[string]. public ReadOnlyComposition this[string compositionName] => throw new NotSupportedException(CompileOnly); } }