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:
@@ -19,9 +19,14 @@ namespace ZB.MOM.WW.ScadaBridge.DataConnectionLayer.Adapters;
|
||||
public static class MxGatewayAlarmMapper
|
||||
{
|
||||
/// <summary>Clamps the gateway severity onto the unified 0–1000 scale.</summary>
|
||||
/// <param name="severity">Raw gateway severity value to clamp.</param>
|
||||
/// <returns>The severity clamped to the range [0, 1000].</returns>
|
||||
public static int NormalizeSeverity(int severity) => Math.Clamp(severity, 0, 1000);
|
||||
|
||||
/// <summary>Maps a gateway condition-state + severity to the unified condition.</summary>
|
||||
/// <param name="state">Gateway proto condition state to map.</param>
|
||||
/// <param name="severity">Raw gateway severity value; normalized to 0–1000.</param>
|
||||
/// <returns>The protocol-neutral <see cref="AlarmConditionState"/> equivalent.</returns>
|
||||
public static AlarmConditionState MapConditionState(ProtoConditionState state, int severity)
|
||||
{
|
||||
var (active, acked) = state switch
|
||||
@@ -36,6 +41,8 @@ public static class MxGatewayAlarmMapper
|
||||
}
|
||||
|
||||
/// <summary>Maps a gateway transition kind to the unified transition kind.</summary>
|
||||
/// <param name="kind">Gateway proto transition kind to map.</param>
|
||||
/// <returns>The protocol-neutral <see cref="AlarmTransitionKind"/> equivalent.</returns>
|
||||
public static AlarmTransitionKind MapKind(ProtoTransitionKind kind) => kind switch
|
||||
{
|
||||
ProtoTransitionKind.Raise => AlarmTransitionKind.Raise,
|
||||
@@ -61,6 +68,8 @@ public static class MxGatewayAlarmMapper
|
||||
}
|
||||
|
||||
/// <summary>Maps a live <see cref="OnAlarmTransitionEvent"/> to a transition.</summary>
|
||||
/// <param name="body">The gateway alarm transition event proto message to map.</param>
|
||||
/// <returns>The protocol-neutral <see cref="NativeAlarmTransition"/>.</returns>
|
||||
public static NativeAlarmTransition MapTransition(OnAlarmTransitionEvent body) => new(
|
||||
SourceReference: body.AlarmFullReference,
|
||||
SourceObjectReference: body.SourceObjectReference,
|
||||
@@ -78,12 +87,15 @@ public static class MxGatewayAlarmMapper
|
||||
LimitValue: "");
|
||||
|
||||
/// <summary>The end-of-snapshot sentinel transition (no condition payload).</summary>
|
||||
/// <returns>A <see cref="NativeAlarmTransition"/> with <c>AlarmTransitionKind.SnapshotComplete</c>.</returns>
|
||||
public static NativeAlarmTransition SnapshotComplete() => new(
|
||||
"", "", "", AlarmTransitionKind.SnapshotComplete,
|
||||
new AlarmConditionState(false, true, null, AlarmShelveState.Unshelved, false, 0),
|
||||
"", "", "", "", "", null, DateTimeOffset.UtcNow, "", "");
|
||||
|
||||
/// <summary>Maps one initial-snapshot <see cref="ActiveAlarmSnapshot"/> entry to a Snapshot transition.</summary>
|
||||
/// <param name="snapshot">The active alarm snapshot proto message to map.</param>
|
||||
/// <returns>A <see cref="NativeAlarmTransition"/> with <c>AlarmTransitionKind.Snapshot</c>.</returns>
|
||||
public static NativeAlarmTransition MapSnapshot(ActiveAlarmSnapshot snapshot) => new(
|
||||
SourceReference: snapshot.AlarmFullReference,
|
||||
SourceObjectReference: snapshot.SourceObjectReference,
|
||||
|
||||
Reference in New Issue
Block a user