< Summary

Information
Class: Elsa.Workflows.CommitStates.Tasks.PopulateCommitStrategyRegistry
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/CommitStates/Tasks/PopulateCommitStrategyRegistry.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 16
Line coverage: 100%
Branch coverage
100%
Covered branches: 4
Total branches: 4
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
ExecuteAsync(...)100%44100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/CommitStates/Tasks/PopulateCommitStrategyRegistry.cs

#LineLine coverage
 1using Elsa.Common;
 2using JetBrains.Annotations;
 3using Microsoft.Extensions.Options;
 4
 5namespace Elsa.Workflows.CommitStates.Tasks;
 6
 7[UsedImplicitly]
 18public class PopulateCommitStrategyRegistry(ICommitStrategyRegistry registry, IOptions<CommitStateOptions> options) : IS
 9{
 10    public Task ExecuteAsync(CancellationToken cancellationToken)
 11    {
 1712        foreach (var strategy in options.Value.WorkflowCommitStrategies.Values) registry.RegisterStrategy(strategy);
 1413        foreach (var strategy in options.Value.ActivityCommitStrategies.Values) registry.RegisterStrategy(strategy);
 114        return Task.CompletedTask;
 15    }
 16}