docs: add XML doc comments across src + Sister Projects section in CLAUDE.md

Bulk CommentChecker pass: fills in <param>/<inheritdoc> tags on public
APIs across all 23 src/ projects so the doc-coverage gate is green. Also
adds a Sister Projects section to CLAUDE.md pointing at the MxAccess
Gateway and OtOpcUa sibling repos, and gitignores local credential
captures (*login*.txt) and the wonder-app-vd03 deploy/ artifacts.
This commit is contained in:
Joseph Doherty
2026-05-28 01:55:24 -04:00
parent 6731845473
commit 1eb6e972b0
381 changed files with 5788 additions and 532 deletions
@@ -90,6 +90,13 @@ public sealed class AuditWriteMiddleware
private readonly ILogger<AuditWriteMiddleware> _logger;
private readonly IOptionsMonitor<AuditLogOptions> _options;
/// <summary>
/// Initializes the middleware with its required dependencies.
/// </summary>
/// <param name="next">The next middleware in the pipeline.</param>
/// <param name="auditWriter">Central audit writer used to persist inbound API audit events.</param>
/// <param name="logger">Logger for this middleware.</param>
/// <param name="options">Live-reloadable audit log options, read per-request.</param>
public AuditWriteMiddleware(
RequestDelegate next,
ICentralAuditWriter auditWriter,
@@ -102,6 +109,10 @@ public sealed class AuditWriteMiddleware
_options = options ?? throw new ArgumentNullException(nameof(options));
}
/// <summary>
/// Executes the middleware: captures the request/response bodies and writes an inbound API audit event.
/// </summary>
/// <param name="ctx">The current HTTP context.</param>
public async Task InvokeAsync(HttpContext ctx)
{
var sw = Stopwatch.StartNew();
@@ -468,6 +479,11 @@ public sealed class AuditWriteMiddleware
private readonly MemoryStream _captured;
private bool _disposed;
/// <summary>
/// Initializes the capturing stream wrapping an inner sink.
/// </summary>
/// <param name="inner">The underlying response stream to forward writes to.</param>
/// <param name="capBytes">Maximum number of bytes to capture for the audit copy.</param>
public CapturedResponseStream(Stream inner, int capBytes)
{
_inner = inner ?? throw new ArgumentNullException(nameof(inner));
@@ -477,33 +493,44 @@ public sealed class AuditWriteMiddleware
_captured = new MemoryStream();
}
/// <inheritdoc />
public override bool CanRead => false;
/// <inheritdoc />
public override bool CanSeek => false;
/// <inheritdoc />
public override bool CanWrite => true;
/// <inheritdoc />
public override long Length =>
throw new NotSupportedException("CapturedResponseStream is write-only.");
/// <inheritdoc />
public override long Position
{
get => throw new NotSupportedException("CapturedResponseStream is write-only.");
set => throw new NotSupportedException("CapturedResponseStream is write-only.");
}
/// <inheritdoc />
public override void Flush() => _inner.Flush();
/// <inheritdoc />
public override Task FlushAsync(CancellationToken cancellationToken) =>
_inner.FlushAsync(cancellationToken);
/// <inheritdoc />
public override int Read(byte[] buffer, int offset, int count) =>
throw new NotSupportedException("CapturedResponseStream is write-only.");
/// <inheritdoc />
public override long Seek(long offset, SeekOrigin origin) =>
throw new NotSupportedException("CapturedResponseStream is write-only.");
/// <inheritdoc />
public override void SetLength(long value) =>
throw new NotSupportedException("CapturedResponseStream is write-only.");
/// <inheritdoc />
public override void Write(byte[] buffer, int offset, int count)
{
// Forward to the real sink FIRST — the client must never miss
@@ -512,12 +539,14 @@ public sealed class AuditWriteMiddleware
CaptureBytes(buffer.AsSpan(offset, count));
}
/// <inheritdoc />
public override void Write(ReadOnlySpan<byte> buffer)
{
_inner.Write(buffer);
CaptureBytes(buffer);
}
/// <inheritdoc />
public override async Task WriteAsync(
byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
@@ -526,6 +555,7 @@ public sealed class AuditWriteMiddleware
CaptureBytes(buffer.AsSpan(offset, count));
}
/// <inheritdoc />
public override async ValueTask WriteAsync(
ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
{
@@ -574,6 +604,7 @@ public sealed class AuditWriteMiddleware
return (string.IsNullOrEmpty(content) ? null : content, truncated);
}
/// <inheritdoc />
protected override void Dispose(bool disposing)
{
if (!_disposed)