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:
@@ -211,6 +211,7 @@ public class CentralHealthAggregator : BackgroundService, ICentralHealthAggregat
|
||||
/// full <c>OfflineTimeout / 2</c>.
|
||||
/// </summary>
|
||||
/// <param name="options">The health monitoring options to derive the interval from.</param>
|
||||
/// <returns>Half the shorter of the two configured offline timeouts.</returns>
|
||||
internal static TimeSpan ComputeCheckInterval(HealthMonitoringOptions options)
|
||||
{
|
||||
var shorter = options.OfflineTimeout < options.CentralOfflineTimeout
|
||||
|
||||
@@ -16,11 +16,7 @@ namespace ZB.MOM.WW.ScadaBridge.HealthMonitoring;
|
||||
/// </summary>
|
||||
public sealed class HealthMonitoringOptionsValidator : OptionsValidatorBase<HealthMonitoringOptions>
|
||||
{
|
||||
/// <summary>
|
||||
/// Validates the health monitoring options, recording a failure if any interval values are non-positive.
|
||||
/// </summary>
|
||||
/// <param name="builder">The accumulator to record failures on.</param>
|
||||
/// <param name="options">The health monitoring options to validate.</param>
|
||||
/// <inheritdoc />
|
||||
protected override void Validate(ValidationBuilder builder, HealthMonitoringOptions options)
|
||||
{
|
||||
builder.RequireThat(options.ReportInterval > TimeSpan.Zero,
|
||||
|
||||
@@ -33,8 +33,10 @@ public interface ICentralHealthAggregator
|
||||
void MarkHeartbeat(string siteId, DateTimeOffset receivedAt);
|
||||
|
||||
/// <summary>Returns a snapshot of all currently tracked site health states.</summary>
|
||||
/// <returns>A dictionary mapping site id to its current <see cref="SiteHealthState"/>.</returns>
|
||||
IReadOnlyDictionary<string, SiteHealthState> GetAllSiteStates();
|
||||
/// <summary>Returns the current health state for the specified site, or null if not tracked.</summary>
|
||||
/// <param name="siteId">The string identifier of the site to look up.</param>
|
||||
/// <returns>The <see cref="SiteHealthState"/> for the site, or null if not yet seen.</returns>
|
||||
SiteHealthState? GetSiteState(string siteId);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace ZB.MOM.WW.ScadaBridge.HealthMonitoring;
|
||||
public interface IClusterNodeProvider
|
||||
{
|
||||
/// <summary>Returns the current status of all cluster nodes for the provider's role scope.</summary>
|
||||
/// <returns>A read-only list of node status records for all known cluster nodes.</returns>
|
||||
IReadOnlyList<NodeStatus> GetClusterNodes();
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -11,6 +11,7 @@ public static class ServiceCollectionExtensions
|
||||
/// Call this on site nodes only. For central, call AddCentralHealthAggregation() instead.
|
||||
/// </summary>
|
||||
/// <param name="services">The DI service collection to register into.</param>
|
||||
/// <returns>The same <paramref name="services"/> instance, for call chaining.</returns>
|
||||
public static IServiceCollection AddSiteHealthMonitoring(this IServiceCollection services)
|
||||
{
|
||||
AddOptionsValidation(services);
|
||||
@@ -24,6 +25,7 @@ public static class ServiceCollectionExtensions
|
||||
/// Does not start the HealthReportSender — call AddSiteHealthMonitoring() on site nodes for that.
|
||||
/// </summary>
|
||||
/// <param name="services">The DI service collection to register into.</param>
|
||||
/// <returns>The same <paramref name="services"/> instance, for call chaining.</returns>
|
||||
public static IServiceCollection AddHealthMonitoring(this IServiceCollection services)
|
||||
{
|
||||
AddOptionsValidation(services);
|
||||
@@ -37,6 +39,7 @@ public static class ServiceCollectionExtensions
|
||||
/// for the central cluster so it appears on /monitoring/health.
|
||||
/// </summary>
|
||||
/// <param name="services">The DI service collection to register into.</param>
|
||||
/// <returns>The same <paramref name="services"/> instance, for call chaining.</returns>
|
||||
public static IServiceCollection AddCentralHealthAggregation(this IServiceCollection services)
|
||||
{
|
||||
AddOptionsValidation(services);
|
||||
|
||||
Reference in New Issue
Block a user