docs: complete XML doc comments via fixdocs (2757 to 131 findings)
Add missing <returns>/<param>/<summary>/<typeparam> tags and clean up misused inheritdoc across 481 files so the documented API surface is complete. Documentation-only (zero code lines changed). The 131 remaining findings are inheritdoc-style warnings deliberately left to preserve hand-written implementation rationale (plan-decision notes, race-condition explanations).
This commit is contained in:
+19
-21
@@ -23,14 +23,10 @@ public sealed class ModbusLifecycleHygieneTests
|
||||
public int DisposeCount;
|
||||
public int SendCount;
|
||||
|
||||
/// <summary>Establishes a connection asynchronously.</summary>
|
||||
/// <param name="ct">Cancellation token for the operation.</param>
|
||||
/// <inheritdoc />
|
||||
public Task ConnectAsync(CancellationToken ct) { Interlocked.Increment(ref ConnectCount); return Task.CompletedTask; }
|
||||
|
||||
/// <summary>Sends a Modbus PDU and receives the response.</summary>
|
||||
/// <param name="unitId">The Modbus unit identifier.</param>
|
||||
/// <param name="pdu">The Protocol Data Unit to send.</param>
|
||||
/// <param name="ct">Cancellation token for the operation.</param>
|
||||
/// <inheritdoc />
|
||||
public Task<byte[]> SendAsync(byte unitId, byte[] pdu, CancellationToken ct)
|
||||
{
|
||||
Interlocked.Increment(ref SendCount);
|
||||
@@ -71,7 +67,8 @@ public sealed class ModbusLifecycleHygieneTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Disposes the transport asynchronously.</summary>
|
||||
/// <summary>Releases the transport and increments the dispose counter.</summary>
|
||||
/// <returns>A completed value task.</returns>
|
||||
public ValueTask DisposeAsync() { Interlocked.Increment(ref DisposeCount); return ValueTask.CompletedTask; }
|
||||
}
|
||||
|
||||
@@ -87,6 +84,7 @@ public sealed class ModbusLifecycleHygieneTests
|
||||
// -------------------- Finding -002 / -012 (2) --------------------
|
||||
|
||||
/// <summary>Verifies that reinitialization clears stale tag cache entries.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Reinitialize_clears_stale_tagsByName_entries()
|
||||
{
|
||||
@@ -108,6 +106,7 @@ public sealed class ModbusLifecycleHygieneTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that reinitialization clears the deadband and write-suppression caches.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Reinitialize_clears_lastPublished_and_lastWritten_caches()
|
||||
{
|
||||
@@ -149,6 +148,7 @@ public sealed class ModbusLifecycleHygieneTests
|
||||
// -------------------- Finding -004 / -012 (4) --------------------
|
||||
|
||||
/// <summary>Verifies that DisposeAsync without Shutdown stops probe loops and tears down the transport.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task DisposeAsync_without_explicit_Shutdown_tears_down_probe_loop_and_transport()
|
||||
{
|
||||
@@ -187,6 +187,7 @@ public sealed class ModbusLifecycleHygieneTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that DisposeAsync disposes the poll engine so subscriptions stop.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task DisposeAsync_disposes_the_pollEngine_so_subscriptions_stop()
|
||||
{
|
||||
@@ -232,13 +233,9 @@ public sealed class ModbusLifecycleHygieneTests
|
||||
/// <summary>How many bytes to return — anything < 2 + bytecount is malformed.</summary>
|
||||
public int ResponseBytes { get; set; } = 1; // just the fc byte, no bytecount
|
||||
|
||||
/// <summary>Establishes a connection asynchronously.</summary>
|
||||
/// <param name="ct">Cancellation token for the operation.</param>
|
||||
/// <inheritdoc />
|
||||
public Task ConnectAsync(CancellationToken ct) => Task.CompletedTask;
|
||||
/// <summary>Sends a Modbus PDU and receives the response.</summary>
|
||||
/// <param name="unitId">The Modbus unit identifier.</param>
|
||||
/// <param name="pdu">The Protocol Data Unit to send.</param>
|
||||
/// <param name="ct">Cancellation token for the operation.</param>
|
||||
/// <inheritdoc />
|
||||
public Task<byte[]> SendAsync(byte unitId, byte[] pdu, CancellationToken ct)
|
||||
{
|
||||
var resp = new byte[ResponseBytes];
|
||||
@@ -246,11 +243,13 @@ public sealed class ModbusLifecycleHygieneTests
|
||||
if (ResponseBytes >= 2) resp[1] = 4; // claim 4 bytes of payload but provide none
|
||||
return Task.FromResult(resp);
|
||||
}
|
||||
/// <summary>Disposes the transport asynchronously.</summary>
|
||||
/// <summary>Releases the transport; this implementation is a no-op.</summary>
|
||||
/// <returns>A completed value task.</returns>
|
||||
public ValueTask DisposeAsync() => ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>Verifies that short response PDUs surface as BadCommunicationError, not IndexOutOfRangeException.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Short_response_PDU_surfaces_as_BadCommunicationError_not_an_IndexOutOfRangeException()
|
||||
{
|
||||
@@ -269,6 +268,7 @@ public sealed class ModbusLifecycleHygieneTests
|
||||
}
|
||||
|
||||
/// <summary>Verifies that response payloads truncated below declared byte count surface as BadCommunicationError.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Response_payload_truncated_below_declared_byteCount_surfaces_as_BadCommunicationError()
|
||||
{
|
||||
@@ -317,16 +317,13 @@ public sealed class ModbusLifecycleHygieneTests
|
||||
/// </summary>
|
||||
private sealed class EmptyBitTransport : IModbusTransport
|
||||
{
|
||||
/// <summary>Returns a completed task without performing any connection.</summary>
|
||||
/// <param name="ct">The cancellation token for the operation.</param>
|
||||
/// <inheritdoc />
|
||||
public Task ConnectAsync(CancellationToken ct) => Task.CompletedTask;
|
||||
/// <summary>Returns a response with zero-byte payload to simulate empty bitmap.</summary>
|
||||
/// <param name="unitId">The Modbus unit ID.</param>
|
||||
/// <param name="pdu">The protocol data unit being sent.</param>
|
||||
/// <param name="ct">The cancellation token for the operation.</param>
|
||||
/// <inheritdoc />
|
||||
public Task<byte[]> SendAsync(byte unitId, byte[] pdu, CancellationToken ct)
|
||||
=> Task.FromResult(new byte[] { pdu[0], 0 });
|
||||
/// <summary>Completes the disposal without doing any work.</summary>
|
||||
/// <summary>Releases the transport; this implementation is a no-op.</summary>
|
||||
/// <returns>A completed value task.</returns>
|
||||
public ValueTask DisposeAsync() => ValueTask.CompletedTask;
|
||||
}
|
||||
|
||||
@@ -340,6 +337,7 @@ public sealed class ModbusLifecycleHygieneTests
|
||||
/// record so reference-assignment atomicity already prevents tearing; the test guards
|
||||
/// against future regressions to a struct-typed health surface).
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task GetHealth_under_concurrent_pressure_always_returns_a_complete_snapshot()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user