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:
@@ -46,11 +46,7 @@ internal sealed class FakeRuntimeSession : IWorkerRuntimeSession
|
||||
/// <summary>Gets a value indicating whether Dispose was called.</summary>
|
||||
public bool Disposed { get; private set; }
|
||||
|
||||
/// <summary>Starts the worker session with the given session ID and process ID.</summary>
|
||||
/// <param name="sessionId">The session identifier.</param>
|
||||
/// <param name="workerProcessId">The worker process ID.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>Worker ready response.</returns>
|
||||
/// <inheritdoc />
|
||||
public Task<WorkerReady> StartAsync(
|
||||
string sessionId,
|
||||
int workerProcessId,
|
||||
@@ -65,9 +61,7 @@ internal sealed class FakeRuntimeSession : IWorkerRuntimeSession
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Dispatches a command to the STA thread.</summary>
|
||||
/// <param name="command">The command to dispatch.</param>
|
||||
/// <returns>The command reply.</returns>
|
||||
/// <inheritdoc />
|
||||
public Task<MxCommandReply> DispatchAsync(StaCommand command)
|
||||
{
|
||||
return Task.Run(
|
||||
@@ -112,8 +106,7 @@ internal sealed class FakeRuntimeSession : IWorkerRuntimeSession
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>Captures current heartbeat snapshot.</summary>
|
||||
/// <returns>Current runtime heartbeat snapshot.</returns>
|
||||
/// <inheritdoc />
|
||||
public WorkerRuntimeHeartbeatSnapshot CaptureHeartbeat()
|
||||
{
|
||||
lock (gate)
|
||||
@@ -132,9 +125,7 @@ internal sealed class FakeRuntimeSession : IWorkerRuntimeSession
|
||||
/// </summary>
|
||||
public uint? SuppressDrainForBatchSize { get; set; }
|
||||
|
||||
/// <summary>Drains queued events up to the specified limit.</summary>
|
||||
/// <param name="maxEvents">Maximum events to drain; 0 drains all.</param>
|
||||
/// <returns>The drained events.</returns>
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<WorkerEvent> DrainEvents(uint maxEvents)
|
||||
{
|
||||
if (SuppressDrainForBatchSize is uint suppressed && maxEvents == suppressed)
|
||||
@@ -157,8 +148,7 @@ internal sealed class FakeRuntimeSession : IWorkerRuntimeSession
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Drains a pending fault if any.</summary>
|
||||
/// <returns>Pending fault or null.</returns>
|
||||
/// <inheritdoc />
|
||||
public WorkerFault? DrainFault()
|
||||
{
|
||||
return null;
|
||||
@@ -168,7 +158,7 @@ internal sealed class FakeRuntimeSession : IWorkerRuntimeSession
|
||||
/// Gets a snapshot of every correlation id passed to
|
||||
/// <see cref="CancelCommand"/>. Recording lets the IPC tests
|
||||
/// assert that a <c>WorkerCancel</c> envelope dispatched on the
|
||||
/// gateway side reaches the runtime session — see Worker.Tests-017.
|
||||
/// gateway side reaches the runtime session.
|
||||
/// </summary>
|
||||
public IReadOnlyList<string> CancelledCorrelationIds
|
||||
{
|
||||
@@ -189,7 +179,7 @@ internal sealed class FakeRuntimeSession : IWorkerRuntimeSession
|
||||
/// command), matching the previous test-double behaviour. Mutated
|
||||
/// and read under <c>lock(gate)</c> to match the locking convention
|
||||
/// the rest of this fake uses for <c>cancelledCorrelationIds</c>,
|
||||
/// <c>snapshot</c>, and <c>events</c> (Worker.Tests-027).
|
||||
/// <c>snapshot</c>, and <c>events</c>.
|
||||
/// </summary>
|
||||
public bool CancelCommandReturnValue
|
||||
{
|
||||
@@ -210,9 +200,7 @@ internal sealed class FakeRuntimeSession : IWorkerRuntimeSession
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Cancels command by correlation ID.</summary>
|
||||
/// <param name="correlationId">The command correlation ID.</param>
|
||||
/// <returns>True if cancelled; false otherwise.</returns>
|
||||
/// <inheritdoc />
|
||||
public bool CancelCommand(string correlationId)
|
||||
{
|
||||
lock (gate)
|
||||
@@ -222,16 +210,13 @@ internal sealed class FakeRuntimeSession : IWorkerRuntimeSession
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Requests graceful shutdown.</summary>
|
||||
/// <inheritdoc />
|
||||
public void RequestShutdown()
|
||||
{
|
||||
releaseDispatch.Set();
|
||||
}
|
||||
|
||||
/// <summary>Shuts down gracefully within the specified timeout.</summary>
|
||||
/// <param name="timeout">Shutdown timeout period.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>Shutdown result.</returns>
|
||||
/// <inheritdoc />
|
||||
public Task<MxAccessShutdownResult> ShutdownGracefullyAsync(
|
||||
TimeSpan timeout,
|
||||
CancellationToken cancellationToken = default)
|
||||
@@ -272,7 +257,7 @@ internal sealed class FakeRuntimeSession : IWorkerRuntimeSession
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Disposes resources.</summary>
|
||||
/// <inheritdoc />
|
||||
public void Dispose()
|
||||
{
|
||||
Disposed = true;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace ZB.MOM.WW.MxGateway.Worker.Tests.TestSupport;
|
||||
/// otherwise report as <c>Passed</c>). Mirrors
|
||||
/// <c>ZB.MOM.WW.MxGateway.IntegrationTests.LiveMxAccessFactAttribute</c>; both
|
||||
/// copies bind to the same <c>GatewayContractInfo</c> constant so the
|
||||
/// env-var name has a single literal source of truth (Worker.Tests-025).
|
||||
/// env-var name has a single literal source of truth.
|
||||
/// </summary>
|
||||
public sealed class LiveMxAccessFactAttribute : FactAttribute
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace ZB.MOM.WW.MxGateway.Worker.Tests.TestSupport;
|
||||
/// <see cref="MxAccessSession.CreateForTesting"/> but do not exercise any
|
||||
/// MXAccess COM call. Replaces the per-file <c>NullMxAccessServer</c> copy
|
||||
/// that previously lived inside <c>AlarmCommandExecutorTests</c> and was
|
||||
/// constructed via reflection — see Worker.Tests-016 for the rationale.
|
||||
/// constructed via reflection.
|
||||
/// </summary>
|
||||
internal sealed class NoopMxAccessServer : IMxAccessServer
|
||||
{
|
||||
@@ -96,7 +96,7 @@ internal sealed class NoopMxAccessServer : IMxAccessServer
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Previously duplicated as a nested class in <c>MxAccessCommandExecutorTests.FakeMxAccessComObject</c>.
|
||||
/// Consolidated here per Worker.Tests-034 so a future field change to the real COM struct only
|
||||
/// Consolidated here so a future field change to the real COM struct only
|
||||
/// requires updating one place.
|
||||
/// </remarks>
|
||||
internal sealed class FakeMxStatus
|
||||
|
||||
@@ -12,6 +12,7 @@ internal static class WorkerFrameTestHelpers
|
||||
{
|
||||
/// <summary>Builds a length-prefixed frame from a protobuf message.</summary>
|
||||
/// <param name="message">Message to serialize into the frame payload.</param>
|
||||
/// <returns>The length-prefixed frame bytes.</returns>
|
||||
public static byte[] CreateFrame(IMessage message)
|
||||
{
|
||||
return CreateFrame(message.ToByteArray());
|
||||
@@ -19,6 +20,7 @@ internal static class WorkerFrameTestHelpers
|
||||
|
||||
/// <summary>Builds a length-prefixed frame from a raw payload.</summary>
|
||||
/// <param name="payload">Payload bytes to wrap in a frame.</param>
|
||||
/// <returns>The length-prefixed frame bytes.</returns>
|
||||
public static byte[] CreateFrame(byte[] payload)
|
||||
{
|
||||
byte[] frame = new byte[sizeof(uint) + payload.Length];
|
||||
|
||||
Reference in New Issue
Block a user