< Summary

Information
Class: Elsa.Workflows.ActivityStateFilterBase
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Abstractions/ActivityStateFilterBase.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 26
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
OnExecuteAsync(...)100%210%
OnExecute(...)100%210%
Pass()100%210%
Filtered(...)100%210%
Elsa.Workflows.IActivityStateFilter.ExecuteAsync(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Abstractions/ActivityStateFilterBase.cs

#LineLine coverage
 1using JetBrains.Annotations;
 2
 3namespace Elsa.Workflows;
 4
 5[UsedImplicitly]
 6public abstract class ActivityStateFilterBase : IActivityStateFilter
 7{
 8    protected virtual Task<ActivityStateFilterResult> OnExecuteAsync(ActivityStateFilterContext context)
 9    {
 010        var result = OnExecute(context);
 011        return Task.FromResult(result);
 12    }
 13
 14    protected virtual ActivityStateFilterResult OnExecute(ActivityStateFilterContext context)
 15    {
 016        return Pass();
 17    }
 18
 019    protected ActivityStateFilterResult Pass() => ActivityStateFilterResult.Pass();
 020    protected ActivityStateFilterResult Filtered(string filteredValue) => ActivityStateFilterResult.Filtered(filteredVal
 21
 22    Task<ActivityStateFilterResult> IActivityStateFilter.ExecuteAsync(ActivityStateFilterContext context)
 23    {
 024        return OnExecuteAsync(context);
 25    }
 26}