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:
@@ -70,6 +70,7 @@ public class DatabaseGateway : IDatabaseGateway
|
||||
/// tests can substitute a connection whose <c>OpenAsync</c> fails.
|
||||
/// </summary>
|
||||
/// <param name="connectionString">The ADO.NET connection string.</param>
|
||||
/// <returns>A new <see cref="DbConnection"/> for the given connection string.</returns>
|
||||
internal virtual DbConnection CreateConnection(string connectionString) =>
|
||||
new SqlConnection(connectionString);
|
||||
|
||||
@@ -145,6 +146,7 @@ public class DatabaseGateway : IDatabaseGateway
|
||||
/// </summary>
|
||||
/// <param name="message">The buffered store-and-forward message to deliver.</param>
|
||||
/// <param name="cancellationToken">Cancellation token for the delivery operation.</param>
|
||||
/// <returns>A task that resolves to <c>true</c> on success, or <c>false</c> if the connection no longer exists.</returns>
|
||||
public async Task<bool> DeliverBufferedAsync(
|
||||
StoreAndForwardMessage message, CancellationToken cancellationToken = default)
|
||||
{
|
||||
@@ -210,6 +212,12 @@ public class DatabaseGateway : IDatabaseGateway
|
||||
// precision for typical money/measurement values), and only fall through
|
||||
// to double for genuinely out-of-decimal-range values (very large
|
||||
// scientific-notation floats).
|
||||
/// <summary>
|
||||
/// Converts a <see cref="JsonElement"/> to the most appropriate SQL parameter value,
|
||||
/// preferring <c>long</c> → <c>decimal</c> → <c>double</c> for numeric kinds to preserve precision.
|
||||
/// </summary>
|
||||
/// <param name="element">The JSON element to convert.</param>
|
||||
/// <returns>A boxed CLR value suitable for use as an ADO.NET parameter, or <see cref="DBNull.Value"/> for null/undefined.</returns>
|
||||
internal static object JsonElementToParameterValue(JsonElement element) => element.ValueKind switch
|
||||
{
|
||||
JsonValueKind.String => (object?)element.GetString() ?? DBNull.Value,
|
||||
|
||||
@@ -17,6 +17,7 @@ public static class ErrorClassifier
|
||||
/// succeed and risks duplicate side effects.
|
||||
/// </summary>
|
||||
/// <param name="statusCode">The HTTP status code to classify.</param>
|
||||
/// <returns><see langword="true"/> for 5xx, 408, or 429; <see langword="false"/> for all other status codes.</returns>
|
||||
public static bool IsTransient(HttpStatusCode statusCode)
|
||||
{
|
||||
var code = (int)statusCode;
|
||||
@@ -27,6 +28,7 @@ public static class ErrorClassifier
|
||||
/// Determines whether an exception represents a transient failure.
|
||||
/// </summary>
|
||||
/// <param name="exception">The exception to classify.</param>
|
||||
/// <returns><see langword="true"/> for connection/timeout/cancellation exceptions; <see langword="false"/> otherwise.</returns>
|
||||
public static bool IsTransient(Exception exception)
|
||||
{
|
||||
return exception is HttpRequestException
|
||||
@@ -40,6 +42,7 @@ public static class ErrorClassifier
|
||||
/// </summary>
|
||||
/// <param name="message">Human-readable failure description.</param>
|
||||
/// <param name="inner">Optional inner exception that caused the transient failure.</param>
|
||||
/// <returns>A new <see cref="TransientExternalSystemException"/> wrapping the given details.</returns>
|
||||
public static TransientExternalSystemException AsTransient(string message, Exception? inner = null)
|
||||
{
|
||||
return new TransientExternalSystemException(message, inner);
|
||||
|
||||
@@ -17,6 +17,7 @@ public static class ServiceCollectionExtensions
|
||||
/// Registers the External System Gateway services, HTTP client factory, and options.
|
||||
/// </summary>
|
||||
/// <param name="services">The service collection to configure.</param>
|
||||
/// <returns>The same <see cref="IServiceCollection"/> for chaining.</returns>
|
||||
public static IServiceCollection AddExternalSystemGateway(this IServiceCollection services)
|
||||
{
|
||||
services.AddOptions<ExternalSystemGatewayOptions>()
|
||||
@@ -49,6 +50,7 @@ public static class ServiceCollectionExtensions
|
||||
/// Placeholder for External System Gateway Akka.NET actor registrations (handled in AkkaHostedService).
|
||||
/// </summary>
|
||||
/// <param name="services">The service collection to configure.</param>
|
||||
/// <returns>The same <see cref="IServiceCollection"/> for chaining.</returns>
|
||||
public static IServiceCollection AddExternalSystemGatewayActors(this IServiceCollection services)
|
||||
{
|
||||
// WP-10: Actor registration happens in AkkaHostedService.
|
||||
|
||||
Reference in New Issue
Block a user