feat(uns): IUnsTreeService structural load + DI registration

This commit is contained in:
Joseph Doherty
2026-06-08 12:23:00 -04:00
parent 0f286a70b8
commit cec670f0c8
6 changed files with 343 additions and 0 deletions
@@ -0,0 +1,19 @@
namespace ZB.MOM.WW.OtOpcUa.AdminUI.Uns;
/// <summary>
/// Loads the structural portion of the unified-namespace (UNS) browse tree —
/// Enterprise → Cluster → Area → Line → Equipment — from the config database.
/// Equipment children (tags/virtual tags) are summarised by count only and loaded
/// lazily by the renderer; this service never returns Tag/VirtualTag leaf nodes.
/// </summary>
public interface IUnsTreeService
{
/// <summary>
/// Loads the full structural tree. Empty clusters are retained so they remain
/// visible and editable. The returned nodes are detached view-models, safe to
/// hold and mutate UI state on after the underlying context is disposed.
/// </summary>
/// <param name="ct">A token to cancel the load.</param>
/// <returns>The enterprise root nodes, each populated down to equipment.</returns>
Task<IReadOnlyList<UnsNode>> LoadStructureAsync(CancellationToken ct = default);
}