< Summary

Information
Class: Elsa.Workflows.BreakBehaviorActivityExecutionContextExtensions
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Extensions/BreakBehaviorActivityExecutionContextExtensions.cs
Line coverage
50%
Covered lines: 1
Uncovered lines: 1
Coverable lines: 2
Total lines: 21
Line coverage: 50%
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
GetIsBreaking(...)100%11100%
SetIsBreaking(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Extensions/BreakBehaviorActivityExecutionContextExtensions.cs

#LineLine coverage
 1namespace Elsa.Workflows;
 2
 3/// <summary>
 4/// Provides extension methods for <see cref="ActivityExecutionContext"/>.
 5/// </summary>
 6public static class BreakBehaviorActivityExecutionContextExtensions
 7{
 8    /// <param name="context"></param>
 9    extension(ActivityExecutionContext context)
 10    {
 11        /// <summary>
 12        /// Gets a value indicating whether the current activity is breaking out of a loop.
 13        /// </summary>
 29014        public bool GetIsBreaking() => context.GetProperty<bool>("IsBreaking");
 15
 16        /// <summary>
 17        /// Sets a value indicating whether the current activity is breaking out of a loop.
 18        /// </summary>
 019        public void SetIsBreaking() => context.SetProperty<bool>("IsBreaking", true);
 20    }
 21}