From d327243fd39b5d9fa319d157f3200c79d3737ba5 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Tue, 14 Jul 2026 14:49:10 -0400 Subject: [PATCH] fix(s7-cli): restore OnDataChange CliFx-console rationale comment The 9cad9ed0 'strip tracking-ID comments' XML-doc sweep collaterally removed the comment explaining why the S7 subscribe command routes OnDataChange through the CliFx IConsole (not System.Console), leaving SubscribeCommandConsoleHandlerCommentTests red. The Modbus copy still carries the comment verbatim and the test guards S7-mirrors-Modbus parity, so restore it (matching the Modbus wording) rather than weaken the guard. S7.Cli tests 49/49. --- .../Commands/SubscribeCommand.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Drivers/Cli/ZB.MOM.WW.OtOpcUa.Driver.S7.Cli/Commands/SubscribeCommand.cs b/src/Drivers/Cli/ZB.MOM.WW.OtOpcUa.Driver.S7.Cli/Commands/SubscribeCommand.cs index 753f9d92..0b9e9dbd 100644 --- a/src/Drivers/Cli/ZB.MOM.WW.OtOpcUa.Driver.S7.Cli/Commands/SubscribeCommand.cs +++ b/src/Drivers/Cli/ZB.MOM.WW.OtOpcUa.Driver.S7.Cli/Commands/SubscribeCommand.cs @@ -50,6 +50,8 @@ public sealed class SubscribeCommand : S7CommandBase { await driver.InitializeAsync("{}", ct); + // Route every data-change event to the CliFx console (not System.Console — the + // analyzer flags it + IConsole is the testable abstraction). driver.OnDataChange += (_, e) => { var line = $"[{DateTime.UtcNow:HH:mm:ss.fff}] " + -- 2.52.0