< Summary

Information
Class: Elsa.Workflows.Runtime.DrainOutcome
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Models/DrainOutcome.cs
Line coverage
80%
Covered lines: 8
Uncovered lines: 2
Coverable lines: 10
Total lines: 23
Line coverage: 80%
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_OverallResult()100%11100%
get_StartedAt()100%210%
get_CompletedAt()100%210%
get_PausePhaseDuration()100%11100%
get_WaitPhaseDuration()100%11100%
get_Sources()100%11100%
get_ExecutionCyclesForceCancelledCount()100%11100%
get_ForceCancelledInstanceIds()100%11100%
get_WasCached()100%11100%

File(s)

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

#LineLine coverage
 1namespace Elsa.Workflows.Runtime;
 2
 3/// <summary>
 4/// Structured result of a completed drain, returned by <c>IDrainOrchestrator.DrainAsync</c>.
 5/// </summary>
 216public sealed record DrainOutcome(
 467    DrainResult OverallResult,
 08    DateTimeOffset StartedAt,
 09    DateTimeOffset CompletedAt,
 2610    TimeSpan PausePhaseDuration,
 2611    TimeSpan WaitPhaseDuration,
 212    IReadOnlyList<IngressSourceFinalState> Sources,
 2713    int ExecutionCyclesForceCancelledCount,
 2314    IReadOnlyList<string> ForceCancelledInstanceIds)
 15{
 16    /// <summary>
 17    /// <c>true</c> when this outcome was returned from the orchestrator's cache (i.e., a previous drain already
 18    /// ran in this generation and the caller's request was answered with the cached result rather than triggering
 19    /// a fresh drain). Audit consumers MUST skip publishing notifications when this flag is set, otherwise
 20    /// repeated calls would emit spurious audit events and break the SC-007 idempotency guarantee.
 21    /// </summary>
 422    public bool WasCached { get; init; }
 23}