< Summary

Information
Class: Elsa.Workflows.DefaultActivityStateFilterManager
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Services/DefaultActivityStateFilterManager.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 17
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
RunFiltersAsync()0%2040%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Services/DefaultActivityStateFilterManager.cs

#LineLine coverage
 1namespace Elsa.Workflows;
 2
 03public class DefaultActivityStateFilterManager(IEnumerable<IActivityStateFilter> filters) : IActivityStateFilterManager
 4{
 5    public async Task<string> RunFiltersAsync(ActivityStateFilterContext context)
 6    {
 07        foreach (var filter in filters)
 8        {
 09            var result = await filter.ExecuteAsync(context);
 10
 011            if (result.IsFiltered)
 012                return result.FilteredValue!;
 13        }
 14
 015        return context.Value.ToString();
 016    }
 17}