docs(src): add missing XML docs and strip tracking-ID comments

Sweep of 203 source files resolving CommentChecker findings: add
<summary>/<param>/<returns>/<inheritdoc> where missing, and remove
resolved task/issue tracking markers (Tests-NNN, Worker-NNN, Server-NNN,
Task N) from code comments. Comment/doc-only — no logic changes.
Server+Tests build clean under TreatWarningsAsErrors.
This commit is contained in:
Joseph Doherty
2026-07-07 14:09:49 -04:00
parent 8914472706
commit fca978de07
203 changed files with 1834 additions and 1383 deletions
@@ -18,6 +18,7 @@ public sealed class StaCommandDispatcherTests
/// <summary>
/// Verifies commands execute on the STA thread in queue order.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task DispatchAsync_ExecutesCommandsOnStaInQueueOrder()
{
@@ -41,6 +42,7 @@ public sealed class StaCommandDispatcherTests
/// <summary>
/// Verifies executor exceptions are captured as HResult in the reply without exposing message details.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task DispatchAsync_WhenExecutorThrows_ReturnsFailureReplyWithHResult()
{
@@ -64,6 +66,7 @@ public sealed class StaCommandDispatcherTests
/// <summary>
/// Verifies cancellation before execution prevents the command from running.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task DispatchAsync_WhenCanceledBeforeExecution_ReturnsCanceledReplyWithoutExecuting()
{
@@ -96,6 +99,7 @@ public sealed class StaCommandDispatcherTests
/// observed and ignored" from "cancel never checked"; it only proves the
/// in-flight command is not aborted.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task DispatchAsync_WhenCanceledWhileExecuting_DoesNotAbortInFlightCommand()
{
@@ -121,6 +125,7 @@ public sealed class StaCommandDispatcherTests
/// <summary>
/// Verifies shutdown rejects new dispatch attempts.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task DispatchAsync_WhenShutdownRequested_RejectsNewCommands()
{
@@ -138,6 +143,7 @@ public sealed class StaCommandDispatcherTests
/// <summary>
/// Verifies shutdown allows the current command to complete but rejects queued commands.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task RequestShutdown_RejectsQueuedCommandButLetsCurrentCommandFinish()
{
@@ -162,6 +168,7 @@ public sealed class StaCommandDispatcherTests
/// <summary>
/// Verifies heartbeat reports current command correlation ID and pending command count.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task PopulateHeartbeat_ReportsCurrentCorrelationAndPendingCount()
{
@@ -37,6 +37,7 @@ public sealed class StaMessagePumpTests
/// <summary>
/// Verifies that WaitForWorkOrMessages returns promptly when the wake event is already signalled.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WaitForWorkOrMessages_WakeEventAlreadySignalled_ReturnsImmediately()
{
@@ -60,6 +61,7 @@ public sealed class StaMessagePumpTests
/// <summary>
/// Verifies that WaitForWorkOrMessages wakes when the wake event is signalled from another thread.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WaitForWorkOrMessages_WakeEventSignalledDuringWait_Returns()
{
@@ -89,6 +91,7 @@ public sealed class StaMessagePumpTests
/// <summary>
/// Verifies that WaitForWorkOrMessages returns on timeout when the wake event is never signalled.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WaitForWorkOrMessages_WakeEventNeverSignalled_ReturnsAfterTimeout()
{
@@ -113,6 +116,7 @@ public sealed class StaMessagePumpTests
/// <summary>
/// Verifies that a zero timeout (the TimeSpan.Zero conversion branch) returns without blocking.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WaitForWorkOrMessages_ZeroTimeout_ReturnsWithoutBlocking()
{
@@ -137,6 +141,7 @@ public sealed class StaMessagePumpTests
/// <summary>
/// Verifies that PumpPendingMessages returns zero when the STA thread message queue is empty.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task PumpPendingMessages_NoMessagesPosted_ReturnsZero()
{
@@ -155,6 +160,7 @@ public sealed class StaMessagePumpTests
/// <summary>
/// Verifies that PumpPendingMessages dispatches and counts messages posted to the STA thread.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task PumpPendingMessages_MessagesPostedToStaThread_ReturnsCountProcessed()
{
@@ -179,6 +185,7 @@ public sealed class StaMessagePumpTests
/// <summary>
/// Verifies that WaitForWorkOrMessages returns once a Windows message is posted to the STA thread.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task WaitForWorkOrMessages_WindowsMessagePosted_ReturnsForInputAvailable()
{
@@ -8,6 +8,7 @@ namespace ZB.MOM.WW.MxGateway.Worker.Tests.Sta;
public sealed class StaRuntimeTests
{
/// <summary>Verifies that InvokeAsync executes commands on the STA thread.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task InvokeAsync_ExecutesCommandOnStaThread()
{
@@ -35,6 +36,7 @@ public sealed class StaRuntimeTests
/// correct dispatch past an arbitrary millisecond budget, which would be a
/// false failure.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task InvokeAsync_WakesIdlePumpForQueuedCommand()
{
@@ -84,6 +86,7 @@ public sealed class StaRuntimeTests
}
/// <summary>Verifies that InvokeAsync faults the returned task when a command raises an exception without stopping the runtime.</summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task InvokeAsync_CommandException_FaultsReturnedTaskWithoutStoppingRuntime()
{
@@ -101,14 +104,15 @@ public sealed class StaRuntimeTests
/// <summary>
/// Verifies that InvokeAsync returns a faulted task when called after
/// Shutdown. Worker-016 introduced <see cref="StaRuntimeShutdownException"/>
/// (a dedicated subtype of <see cref="InvalidOperationException"/>) so
/// Shutdown. <see cref="StaRuntimeShutdownException"/> is
/// a dedicated subtype of <see cref="InvalidOperationException"/> so
/// callers — notably <c>MxAccessStaSession.RunAlarmPollLoopAsync</c> —
/// can distinguish the graceful shutdown signal from a vanilla
/// <see cref="InvalidOperationException"/> such as an STA-affinity
/// assertion. The test pins the exact type so a regression that
/// reverts to a plain <c>InvalidOperationException</c> fails here.
/// </summary>
/// <returns>A task that represents the asynchronous operation.</returns>
[Fact]
public async Task InvokeAsync_AfterShutdown_ReturnsFaultedTask()
{
@@ -164,14 +168,14 @@ public sealed class StaRuntimeTests
/// <summary>The thread ID where Uninitialize was called.</summary>
public int? UninitializeThreadId { get; private set; }
/// <summary>Initializes the COM apartment and records the calling thread.</summary>
/// <inheritdoc />
public void Initialize()
{
InitializeCount++;
InitializeThreadId = Thread.CurrentThread.ManagedThreadId;
}
/// <summary>Uninitializes the COM apartment and records the calling thread.</summary>
/// <inheritdoc />
public void Uninitialize()
{
UninitializeCount++;