< Summary

Information
Class: Elsa.Workflows.CommitStates.Strategies.CommitAlwaysActivityStrategy
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/CommitStates/Strategies/Activities/CommitAlwaysActivityStrategy.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 17
Line coverage: 0%
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
ShouldCommit(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/CommitStates/Strategies/Activities/CommitAlwaysActivityStrategy.cs

#LineLine coverage
 1using System.ComponentModel;
 2
 3namespace Elsa.Workflows.CommitStates.Strategies;
 4
 5/// <summary>
 6/// Represents a strategy that always commits the workflow whenever the associated activity is about to execute or has e
 7/// This strategy ensures that the workflow's state is persisted at both pre-execution and post-execution stages of the 
 8/// </summary>
 9[DisplayName("Commit Before And After")]
 10[Description("Always commit the workflow state when the activity is about to execute or has executed.")]
 11public class CommitAlwaysActivityStrategy : IActivityCommitStrategy
 12{
 13    public CommitAction ShouldCommit(ActivityCommitStateStrategyContext context)
 14    {
 015        return CommitAction.Commit;
 16    }
 17}