docs: backfill XML documentation across 756 files
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public members surfaced by commentchecker — resolves 5,847 of 5,869 issues (99.6%) across three /fixdocs passes.
This commit is contained in:
@@ -19,6 +19,9 @@ public sealed class EfAlarmActorStateStore : IAlarmActorStateStore
|
||||
private readonly IDbContextFactory<OtOpcUaConfigDbContext> _dbFactory;
|
||||
private readonly ILogger<EfAlarmActorStateStore> _logger;
|
||||
|
||||
/// <summary>Initializes a new instance of the EfAlarmActorStateStore.</summary>
|
||||
/// <param name="dbFactory">The factory for creating database contexts.</param>
|
||||
/// <param name="logger">The logger instance.</param>
|
||||
public EfAlarmActorStateStore(
|
||||
IDbContextFactory<OtOpcUaConfigDbContext> dbFactory,
|
||||
ILogger<EfAlarmActorStateStore> logger)
|
||||
@@ -27,6 +30,10 @@ public sealed class EfAlarmActorStateStore : IAlarmActorStateStore
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// <summary>Loads the alarm state snapshot from the database.</summary>
|
||||
/// <param name="alarmId">The identifier of the alarm.</param>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
/// <returns>The alarm state snapshot, or null if not found.</returns>
|
||||
public async Task<AlarmActorStateSnapshot?> LoadAsync(string alarmId, CancellationToken ct)
|
||||
{
|
||||
using var db = await _dbFactory.CreateDbContextAsync(ct).ConfigureAwait(false);
|
||||
@@ -43,6 +50,9 @@ public sealed class EfAlarmActorStateStore : IAlarmActorStateStore
|
||||
LastAckUser: row.LastAckUser);
|
||||
}
|
||||
|
||||
/// <summary>Saves the alarm state snapshot to the database.</summary>
|
||||
/// <param name="snapshot">The alarm state snapshot to save.</param>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
public async Task SaveAsync(AlarmActorStateSnapshot snapshot, CancellationToken ct)
|
||||
{
|
||||
using var db = await _dbFactory.CreateDbContextAsync(ct).ConfigureAwait(false);
|
||||
|
||||
@@ -49,6 +49,12 @@ public sealed class ScriptedAlarmActor : ReceiveActor
|
||||
|
||||
public sealed record StateRestored(ScriptedAlarmActorState State, string? LastAckUser);
|
||||
|
||||
/// <summary>Creates a new Props for a ScriptedAlarmActor with the given configuration and optional dependencies.</summary>
|
||||
/// <param name="config">The alarm configuration.</param>
|
||||
/// <param name="evaluator">The alarm evaluator; defaults to null evaluator if not provided.</param>
|
||||
/// <param name="publisherFactory">Optional factory for creating DPS publishers.</param>
|
||||
/// <param name="stateStore">Optional state store for persistence; defaults to null store if not provided.</param>
|
||||
/// <returns>Akka Props for creating the actor.</returns>
|
||||
public static Props Props(
|
||||
AlarmConfig config,
|
||||
IScriptedAlarmEvaluator? evaluator = null,
|
||||
@@ -62,9 +68,16 @@ public sealed class ScriptedAlarmActor : ReceiveActor
|
||||
|
||||
/// <summary>Legacy single-arg ctor kept for callers that only care about the state machine
|
||||
/// (no engine evaluation, no DPS fan-out, no persistence). Equivalent to <c>Props(new AlarmConfig(...))</c>.</summary>
|
||||
/// <param name="alarmId">The alarm identifier, used as both alarm ID and name.</param>
|
||||
/// <returns>Akka Props for creating the actor with minimal configuration.</returns>
|
||||
public static Props Props(string alarmId) =>
|
||||
Props(new AlarmConfig(alarmId, alarmId, EquipmentPath: "", Severity: 500, Predicate: null));
|
||||
|
||||
/// <summary>Initializes a new ScriptedAlarmActor with the given configuration and dependencies.</summary>
|
||||
/// <param name="config">The alarm configuration.</param>
|
||||
/// <param name="evaluator">The alarm predicate evaluator.</param>
|
||||
/// <param name="publisherFactory">Optional factory for creating DPS publishers.</param>
|
||||
/// <param name="stateStore">The state store for loading and saving alarm state.</param>
|
||||
public ScriptedAlarmActor(
|
||||
AlarmConfig config,
|
||||
IScriptedAlarmEvaluator evaluator,
|
||||
@@ -83,6 +96,7 @@ public sealed class ScriptedAlarmActor : ReceiveActor
|
||||
Receive<StateRestored>(OnStateRestored);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void PreStart()
|
||||
{
|
||||
// Load persisted state — when the store has a row, restore in-memory state before the
|
||||
|
||||
Reference in New Issue
Block a user