docs: backfill XML documentation across 756 files
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped

Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public
members surfaced by commentchecker — resolves 5,847 of 5,869 issues
(99.6%) across three /fixdocs passes.
This commit is contained in:
Joseph Doherty
2026-05-28 08:10:17 -04:00
parent f9fc7dd2e1
commit 64e3fbe035
756 changed files with 9876 additions and 96 deletions
@@ -15,20 +15,52 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.Modbus.Tests;
[Trait("Category", "Unit")]
public sealed class ModbusLoggerInjectionTests
{
/// <summary>Test logger that captures log entries.</summary>
private sealed class CapturingLogger : ILogger<ModbusDriver>
{
public readonly List<(LogLevel Level, string Message)> Entries = new();
/// <summary>Begins a scope for logging.</summary>
/// <typeparam name="TState">The type of the state.</typeparam>
/// <param name="state">The state object.</param>
/// <returns>A disposable scope instance.</returns>
public IDisposable BeginScope<TState>(TState state) where TState : notnull => NullScope.Instance;
/// <summary>Determines if logging is enabled for the specified level.</summary>
/// <param name="logLevel">The log level to check.</param>
/// <returns>True if logging is enabled for the specified level.</returns>
public bool IsEnabled(LogLevel logLevel) => true;
/// <summary>Logs a message with the specified level, event ID, state, exception, and formatter.</summary>
/// <typeparam name="TState">The type of the state.</typeparam>
/// <param name="logLevel">The log level.</param>
/// <param name="eventId">The event ID.</param>
/// <param name="state">The state object.</param>
/// <param name="exception">The exception, if any.</param>
/// <param name="formatter">The function to format the log message.</param>
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
=> Entries.Add((logLevel, formatter(state, exception)));
private sealed class NullScope : IDisposable { public static readonly NullScope Instance = new(); public void Dispose() { } }
/// <summary>Disposes the logger.</summary>
public void Dispose() { }
private sealed class NullScope : IDisposable
{
public static readonly NullScope Instance = new();
/// <inheritdoc />
public void Dispose() { }
}
}
/// <summary>Test transport with a protected address hole.</summary>
private sealed class ProtectedHoleTransport : IModbusTransport
{
/// <summary>Gets or sets the protected address.</summary>
public ushort ProtectedAddress { get; set; } = 102;
/// <summary>Simulates connecting to the Modbus device.</summary>
/// <param name="ct">The cancellation token.</param>
/// <returns>A completed task.</returns>
public Task ConnectAsync(CancellationToken ct) => Task.CompletedTask;
/// <summary>Simulates sending a Modbus PDU.</summary>
/// <param name="unitId">The Modbus unit ID.</param>
/// <param name="pdu">The protocol data unit.</param>
/// <param name="ct">The cancellation token.</param>
/// <returns>The response PDU.</returns>
public Task<byte[]> SendAsync(byte unitId, byte[] pdu, CancellationToken ct)
{
var addr = (ushort)((pdu[1] << 8) | pdu[2]);
@@ -39,9 +71,12 @@ public sealed class ModbusLoggerInjectionTests
resp[0] = pdu[0]; resp[1] = (byte)(qty * 2);
return Task.FromResult(resp);
}
/// <summary>Disposes the transport asynchronously.</summary>
/// <returns>A completed value task.</returns>
public ValueTask DisposeAsync() => ValueTask.CompletedTask;
}
/// <summary>Verifies first failure emits single warning and subsequent refires stay quiet.</summary>
[Fact]
public async Task First_Failure_Emits_Single_Warning_Subsequent_Refire_Stays_Quiet()
{
@@ -72,6 +107,7 @@ public sealed class ModbusLoggerInjectionTests
await drv.ShutdownAsync(CancellationToken.None);
}
/// <summary>Verifies reprobe clearing prohibition emits information log.</summary>
[Fact]
public async Task Reprobe_Clearing_Prohibition_Emits_Information_Log()
{