Files
ScadaBridge/src/ZB.MOM.WW.ScadaBridge.ScriptAnalysis/TriggerCompileSurface.cs
T
Joseph Doherty 5a878b78d4 docs(xml): fill missing XML doc comments + strip task-tracking refs across src (fixdocs)
Add missing <summary>/<param>/<returns>/<typeparam> tags and switch
interface implementations to <inheritdoc/> across 106 files; strip
project bookkeeping identifiers (Task NN, #05-TNN, PLAN-04, StoreAndForward-0NN)
from shipped code comments while preserving the descriptive rationale.
Comment-only: zero code-logic lines changed; solution builds 0/0.

Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
2026-07-10 08:23:56 -04:00

54 lines
2.5 KiB
C#

namespace ZB.MOM.WW.ScadaBridge.ScriptAnalysis;
/// <summary>
/// A <b>compile-only</b> mirror of the SiteRuntime
/// <c>TriggerExpressionGlobals</c> bind surface. A trigger expression is a bare
/// boolean expression referencing <c>Attributes["x"]</c> / <c>Children["c"]</c>
/// / <c>Parent</c>; the design-time deploy gate compiles candidate
/// trigger expressions against this type to catch undefined symbols.
///
/// <para>
/// Only the read-only bind surface is reproduced — the runtime
/// <c>ExtractExpression</c> 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
/// <see cref="NotSupportedException"/>.
/// </para>
/// </summary>
public sealed class TriggerCompileSurface
{
private const string CompileOnly = "compile-only surface";
/// <summary>Mirrors <c>TriggerExpressionGlobals.Attributes</c>.</summary>
public ReadOnlyAttributes Attributes => throw new NotSupportedException(CompileOnly);
/// <summary>Mirrors <c>TriggerExpressionGlobals.Children</c>.</summary>
public ReadOnlyChildren Children => throw new NotSupportedException(CompileOnly);
/// <summary>Mirrors <c>TriggerExpressionGlobals.Parent</c>.</summary>
public ReadOnlyComposition? Parent => throw new NotSupportedException(CompileOnly);
/// <summary>Compile-only mirror of <c>TriggerExpressionGlobals.ReadOnlyAttributes</c>.</summary>
public sealed class ReadOnlyAttributes
{
/// <summary>Mirrors <c>ReadOnlyAttributes.this[string]</c>.</summary>
/// <param name="key">The attribute name to look up.</param>
public object? this[string key] => throw new NotSupportedException(CompileOnly);
}
/// <summary>Compile-only mirror of <c>TriggerExpressionGlobals.ReadOnlyComposition</c>.</summary>
public sealed class ReadOnlyComposition
{
/// <summary>Mirrors <c>ReadOnlyComposition.Attributes</c>.</summary>
public ReadOnlyAttributes Attributes => throw new NotSupportedException(CompileOnly);
}
/// <summary>Compile-only mirror of <c>TriggerExpressionGlobals.ReadOnlyChildren</c>.</summary>
public sealed class ReadOnlyChildren
{
/// <summary>Mirrors <c>ReadOnlyChildren.this[string]</c>.</summary>
/// <param name="compositionName">The composition name to look up.</param>
public ReadOnlyComposition this[string compositionName] => throw new NotSupportedException(CompileOnly);
}
}