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
@@ -12,6 +12,7 @@ public sealed class ResilientConfigReaderTests : IDisposable
{
private readonly string _root = Path.Combine(Path.GetTempPath(), $"otopcua-reader-{Guid.NewGuid():N}");
/// <summary>Disposes temporary test files.</summary>
public void Dispose()
{
try
@@ -24,6 +25,7 @@ public sealed class ResilientConfigReaderTests : IDisposable
catch { /* best-effort */ }
}
/// <summary>Verifies that successful central DB reads return value and mark fresh.</summary>
[Fact]
public async Task CentralDbSucceeds_ReturnsValue_MarksFresh()
{
@@ -42,6 +44,7 @@ public sealed class ResilientConfigReaderTests : IDisposable
flag.IsStale.ShouldBeFalse("successful central-DB read clears stale flag");
}
/// <summary>Verifies that exhausted retries fall back to cache and mark stale.</summary>
[Fact]
public async Task CentralDbFails_ExhaustsRetries_FallsBackToCache_MarksStale()
{
@@ -74,6 +77,7 @@ public sealed class ResilientConfigReaderTests : IDisposable
flag.IsStale.ShouldBeTrue("cache fallback flips stale flag true");
}
/// <summary>Verifies that DB failure with unavailable cache throws.</summary>
[Fact]
public async Task CentralDbFails_AndCacheAlsoUnavailable_Throws()
{
@@ -94,6 +98,7 @@ public sealed class ResilientConfigReaderTests : IDisposable
flag.IsStale.ShouldBeFalse("no snapshot ever served, so flag stays whatever it was");
}
/// <summary>Verifies that cancellation is not retried.</summary>
[Fact]
public async Task Cancellation_NotRetried()
{
@@ -127,6 +132,7 @@ public sealed class ResilientConfigReaderTests : IDisposable
// must fall back to the sealed cache, not propagate as caller cancellation.
// ------------------------------------------------------------------------------------
/// <summary>Verifies that command timeout TaskCanceledException falls back to cache.</summary>
[Fact]
public async Task CommandTimeout_TaskCanceledException_FallsBackToCache()
{
@@ -156,6 +162,7 @@ public sealed class ResilientConfigReaderTests : IDisposable
flag.IsStale.ShouldBeTrue("cache fallback marks the stale flag");
}
/// <summary>Verifies that Polly timeout rejection falls back to cache.</summary>
[Fact]
public async Task PollyTimeout_TimeoutRejectedException_FallsBackToCache()
{
@@ -193,6 +200,7 @@ public sealed class ResilientConfigReaderTests : IDisposable
// exception chain). Project rule: no credential or connection-string fragment in logs.
// ------------------------------------------------------------------------------------
/// <summary>Verifies that fallback warnings do not log exceptions or password fragments.</summary>
[Fact]
public async Task FallbackWarning_does_not_log_full_exception_object_or_password_fragment()
{
@@ -233,6 +241,7 @@ public sealed class ResilientConfigReaderTests : IDisposable
warning.RenderedMessage.ShouldNotContain("User Id=", Case.Insensitive);
}
/// <summary>Verifies that caller cancellation propagates rather than falling back.</summary>
[Fact]
public async Task CallerCancellation_Propagates_NotFallback()
{
@@ -267,22 +276,45 @@ public sealed class ResilientConfigReaderTests : IDisposable
}
}
/// <summary>Represents a captured log record for testing.</summary>
internal sealed record LogRecord(LogLevel LogLevel, string RenderedMessage, Exception? Exception);
/// <summary>Captures log records for assertion in tests.</summary>
internal sealed class CapturingLogger<T> : ILogger<T>
{
/// <summary>Gets the list of captured log records.</summary>
public List<LogRecord> Records { get; } = new();
/// <summary>Begins a scope (no-op for testing).</summary>
/// <typeparam name="TState">The type of the scope state.</typeparam>
/// <param name="state">The scope state.</param>
/// <returns>A disposable scope handle.</returns>
public IDisposable BeginScope<TState>(TState state) where TState : notnull => NullScope.Instance;
/// <summary>Returns true to enable all log levels.</summary>
/// <param name="logLevel">The log level to check.</param>
/// <returns>True to indicate the log level is enabled.</returns>
public bool IsEnabled(LogLevel logLevel) => true;
/// <summary>Logs a message by capturing it.</summary>
/// <typeparam name="TState">The type of the log state.</typeparam>
/// <param name="logLevel">The log level.</param>
/// <param name="eventId">The event identifier.</param>
/// <param name="state">The log state.</param>
/// <param name="exception">The exception, if any.</param>
/// <param name="formatter">Function to format the log message.</param>
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
{
Records.Add(new LogRecord(logLevel, formatter(state, exception), exception));
}
/// <summary>No-op scope for testing.</summary>
private sealed class NullScope : IDisposable
{
/// <summary>Gets the singleton instance.</summary>
public static readonly NullScope Instance = new();
/// <summary>Disposes the scope (no-op).</summary>
public void Dispose() { }
}
}
@@ -290,12 +322,14 @@ internal sealed class CapturingLogger<T> : ILogger<T>
[Trait("Category", "Unit")]
public sealed class StaleConfigFlagTests
{
/// <summary>Verifies that default state is fresh.</summary>
[Fact]
public void Default_IsFresh()
{
new StaleConfigFlag().IsStale.ShouldBeFalse();
}
/// <summary>Verifies that stale and fresh states toggle correctly.</summary>
[Fact]
public void MarkStale_ThenFresh_Toggles()
{
@@ -306,6 +340,7 @@ public sealed class StaleConfigFlagTests
flag.IsStale.ShouldBeFalse();
}
/// <summary>Verifies that concurrent writes converge to the final state.</summary>
[Fact]
public void ConcurrentWrites_Converge()
{