< Summary

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

#LineLine coverage
 1using System.ComponentModel;
 2
 3namespace Elsa.Workflows.CommitStates.Strategies;
 4
 5/// <summary>
 6/// A strategy implementation of <see cref="IActivityCommitStrategy"/> that specifies
 7/// the workflow should never commit when the associated activity is executed or has executed.
 8/// This overrides any workflow-level commit strategy.
 9/// </summary>
 10[DisplayName("Commit Later")]
 11[Description("Workflow state will not be commited before or after the activity executes.")]
 12public class CommitNeverActivityStrategy : IActivityCommitStrategy
 13{
 14    public CommitAction ShouldCommit(ActivityCommitStateStrategyContext context)
 15    {
 016        return CommitAction.Skip;
 17    }
 18}