< Summary

Information
Class: Elsa.Workflows.Runtime.QuiescenceState
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Models/QuiescenceState.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 25
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_Reason()100%11100%
get_PausedAt()100%11100%
get_DrainStartedAt()100%11100%
get_PauseReasonText()100%11100%
get_PauseRequestedBy()100%11100%
get_GenerationId()100%11100%
get_IsAcceptingNewWork()100%11100%
Initial(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Models/QuiescenceState.cs

#LineLine coverage
 1namespace Elsa.Workflows.Runtime;
 2
 3/// <summary>
 4/// Composite signal describing whether the runtime is accepting new work and, if not, why not.
 5/// Immutable snapshot — the active state is always read through <c>IQuiescenceSignal.CurrentState</c>.
 6/// </summary>
 1207public sealed record QuiescenceState(
 4298    QuiescenceReason Reason,
 279    DateTimeOffset? PausedAt,
 1710    DateTimeOffset? DrainStartedAt,
 3011    string? PauseReasonText,
 2212    string? PauseRequestedBy,
 12413    string GenerationId)
 14{
 15    /// <summary>
 16    /// Convenience derived flag: <c>true</c> iff <see cref="Reason"/> is <see cref="QuiescenceReason.None"/>.
 17    /// </summary>
 27418    public bool IsAcceptingNewWork => Reason == QuiescenceReason.None;
 19
 20    /// <summary>
 21    /// Creates the initial state for a fresh runtime generation.
 22    /// </summary>
 23    public static QuiescenceState Initial(string generationId) =>
 12024        new(QuiescenceReason.None, null, null, null, null, generationId);
 25}