From 984ef79c1fc6ea9859f09e775a89fa67385d685f Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sun, 7 Jun 2026 06:11:56 -0400 Subject: [PATCH] docs(opcua): correct EquipmentVirtualTagPlan equality comment (element-wise, not by-ref) --- src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/Phase7Plan.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/Phase7Plan.cs b/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/Phase7Plan.cs index cae06653..84ded60b 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/Phase7Plan.cs +++ b/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/Phase7Plan.cs @@ -112,10 +112,11 @@ public static class Phase7Planner t => t.TagId, (a, b) => new Phase7Plan.EquipmentTagDelta(a, b)); - // VirtualTags diff by VirtualTagId, mirroring the EquipmentTags pass. Element equality on - // EquipmentVirtualTagPlan compares its scalar fields (Expression/DataType/Name/FolderPath/…) - // by value; DependencyRefs (an IReadOnlyList) compares by reference, so a fresh list - // instance is conservatively treated as changed — fine for a rebuild trigger. + // VirtualTags diff by VirtualTagId, mirroring the EquipmentTags pass. EquipmentVirtualTagPlan + // overrides record equality to compare ALL fields by value — scalars (Expression/DataType/ + // Name/FolderPath) plus DependencyRefs element-wise (SequenceEqual). So a no-op redeploy (fresh + // list instances, identical contents) correctly diffs to empty; only a real content change is + // flagged as changed. var (addedVTags, removedVTags, changedVTags) = DiffById( previous.EquipmentVirtualTags, next.EquipmentVirtualTags, t => t.VirtualTagId,