docs: complete XML doc coverage (returns, summaries, inheritdoc)
Resolve all 622 issues flagged by the enhanced CommentChecker: add missing <returns> tags (incl. the standard phrasing on non-generic Task methods), add missing <summary> tags, and replace misused/redundant <inheritdoc/> on members that override or implement nothing with real documentation. Documentation-only — no behavior change; solution builds clean.
This commit is contained in:
@@ -79,6 +79,7 @@ public sealed class BundleImporter : IBundleImporter
|
||||
/// <param name="encryptor">Handles AES-256-GCM decryption of encrypted bundles.</param>
|
||||
/// <param name="entitySerializer">Deserializes entity DTOs from bundle content.</param>
|
||||
/// <param name="sessionStore">In-memory session store for loaded bundle state.</param>
|
||||
/// <param name="unlockRateLimiter">Rate limiter for passphrase unlock attempts per client IP.</param>
|
||||
/// <param name="options">Transport configuration options.</param>
|
||||
/// <param name="timeProvider">Abstracted time provider for testability.</param>
|
||||
/// <param name="templateRepo">Template engine repository for diff and apply.</param>
|
||||
|
||||
@@ -21,6 +21,11 @@ internal sealed class BundleSessionEvictionService : BackgroundService
|
||||
private readonly IBundleSessionStore _sessionStore;
|
||||
private readonly ILogger<BundleSessionEvictionService> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of <see cref="BundleSessionEvictionService"/>.
|
||||
/// </summary>
|
||||
/// <param name="sessionStore">The bundle session store to sweep for expired sessions.</param>
|
||||
/// <param name="logger">Logger for sweep diagnostics.</param>
|
||||
public BundleSessionEvictionService(
|
||||
IBundleSessionStore sessionStore,
|
||||
ILogger<BundleSessionEvictionService> logger)
|
||||
@@ -29,6 +34,7 @@ internal sealed class BundleSessionEvictionService : BackgroundService
|
||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
while (!stoppingToken.IsCancellationRequested)
|
||||
|
||||
@@ -122,6 +122,8 @@ public sealed class BundleUnlockRateLimiter
|
||||
/// within the trailing window. Primarily for tests / diagnostics; not part of the
|
||||
/// hot-path.
|
||||
/// </summary>
|
||||
/// <param name="clientKey">Opaque caller identifier — typically the remote IP.</param>
|
||||
/// <returns>The number of recorded attempts for the key that still fall within the trailing window.</returns>
|
||||
public int GetAttemptCount(string clientKey)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(clientKey);
|
||||
@@ -150,6 +152,7 @@ public sealed class BundleUnlockRateLimiter
|
||||
/// </summary>
|
||||
private sealed class AttemptBucket
|
||||
{
|
||||
/// <summary>Ordered queue of attempt timestamps within the current trailing window.</summary>
|
||||
public Queue<DateTimeOffset> Timestamps { get; } = new();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ public sealed class BundleSerializer
|
||||
/// build the manifest.
|
||||
/// </summary>
|
||||
/// <param name="content">The bundle content DTO to serialize.</param>
|
||||
/// <returns>The UTF-8 JSON byte representation of <paramref name="content"/>.</returns>
|
||||
public byte[] SerializeContentBytes(BundleContentDto content)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(content);
|
||||
@@ -48,6 +49,7 @@ public sealed class BundleSerializer
|
||||
/// <param name="manifest">The bundle manifest describing the content and encryption metadata.</param>
|
||||
/// <param name="passphrase">Passphrase used for encryption; null produces a plaintext bundle.</param>
|
||||
/// <param name="encryptor">Encryptor required when <paramref name="passphrase"/> is supplied.</param>
|
||||
/// <returns>A seeked-to-start <see cref="MemoryStream"/> containing the bundle ZIP archive.</returns>
|
||||
public Stream Pack(
|
||||
BundleContentDto content,
|
||||
BundleManifest manifest,
|
||||
@@ -124,6 +126,7 @@ public sealed class BundleSerializer
|
||||
/// Reads and deserializes the manifest entry from a bundle ZIP stream.
|
||||
/// </summary>
|
||||
/// <param name="zipStream">The ZIP stream containing the bundle.</param>
|
||||
/// <returns>The deserialized <see cref="BundleManifest"/> from the bundle.</returns>
|
||||
public BundleManifest ReadManifest(Stream zipStream)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(zipStream);
|
||||
@@ -145,6 +148,7 @@ public sealed class BundleSerializer
|
||||
/// </summary>
|
||||
/// <param name="zipStream">The ZIP stream containing the bundle.</param>
|
||||
/// <param name="manifest">The bundle manifest used to determine which content entry to read.</param>
|
||||
/// <returns>The raw bytes from the content entry (<c>content.enc</c> or <c>content.json</c>).</returns>
|
||||
public byte[] ReadContentBytes(Stream zipStream, BundleManifest manifest)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(zipStream);
|
||||
@@ -168,6 +172,7 @@ public sealed class BundleSerializer
|
||||
/// <param name="manifest">The bundle manifest providing encryption metadata.</param>
|
||||
/// <param name="passphrase">Passphrase for decryption; required when the manifest indicates encryption.</param>
|
||||
/// <param name="encryptor">Encryptor used for decryption; required when the manifest indicates encryption.</param>
|
||||
/// <returns>The deserialized <see cref="BundleContentDto"/> from the plaintext content.</returns>
|
||||
public BundleContentDto UnpackContent(
|
||||
byte[] contentBytes,
|
||||
BundleManifest manifest,
|
||||
|
||||
@@ -18,6 +18,7 @@ public static class ServiceCollectionExtensions
|
||||
/// Registers the Transport component services: encryptor, manifest builder/validator, serializers, resolver, exporter, importer, and session store.
|
||||
/// </summary>
|
||||
/// <param name="services">The service collection to register into.</param>
|
||||
/// <returns>The same <see cref="IServiceCollection"/> to allow chaining.</returns>
|
||||
public static IServiceCollection AddTransport(this IServiceCollection services)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(services);
|
||||
|
||||
Reference in New Issue
Block a user