5a878b78d4
Add missing <summary>/<param>/<returns>/<typeparam> tags and switch interface implementations to <inheritdoc/> across 106 files; strip project bookkeeping identifiers (Task NN, #05-TNN, PLAN-04, StoreAndForward-0NN) from shipped code comments while preserving the descriptive rationale. Comment-only: zero code-logic lines changed; solution builds 0/0. Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
27 lines
1.5 KiB
C#
27 lines
1.5 KiB
C#
namespace ZB.MOM.WW.ScadaBridge.DelmiaNotifier;
|
|
|
|
/// <summary>Whether a single POST attempt reached the server (<see cref="Connected"/>) or never did (<see cref="ConnectFailed"/>).</summary>
|
|
internal enum AttemptKind
|
|
{
|
|
Connected,
|
|
ConnectFailed,
|
|
}
|
|
|
|
/// <summary>Result of one POST attempt against a single base URL.</summary>
|
|
/// <param name="Kind">Did the attempt reach the server?</param>
|
|
/// <param name="StatusCode">HTTP status when <see cref="AttemptKind.Connected"/>; 0 otherwise.</param>
|
|
/// <param name="Body">Parsed response body on a 2xx; null otherwise.</param>
|
|
/// <param name="Error">Connection/exception detail when <see cref="AttemptKind.ConnectFailed"/>; null otherwise.</param>
|
|
internal sealed record AttemptOutcome(AttemptKind Kind, int StatusCode, RecipeDownloadResult? Body, string? Error);
|
|
|
|
/// <summary>Seam over a single recipe-download POST attempt, so the failover loop is testable without real HTTP.</summary>
|
|
internal interface IRecipeSender
|
|
{
|
|
/// <summary>Sends the recipe download payload to a single base URL as one POST attempt.</summary>
|
|
/// <param name="baseUrl">The base URL to POST the recipe download to.</param>
|
|
/// <param name="payload">The recipe download payload to send.</param>
|
|
/// <param name="ct">Cancellation token.</param>
|
|
/// <returns>The outcome of the attempt: connected (with status/body) or connect-failed (with error detail).</returns>
|
|
Task<AttemptOutcome> SendAsync(string baseUrl, RecipeDownload payload, CancellationToken ct);
|
|
}
|