< Summary

Information
Class: Elsa.Workflows.Management.Services.ActivityRegistryPopulator
Assembly: Elsa.Workflows.Management
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Services/ActivityRegistryPopulator.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 20
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
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%
PopulateRegistryAsync()100%11100%
EnsureRegistryPopulatedAsync()100%22100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Services/ActivityRegistryPopulator.cs

#LineLine coverage
 1namespace Elsa.Workflows.Management.Services;
 2
 3/// <summary>
 4/// Populates the <see cref="IActivityRegistry"/> with descriptors provided by <see cref="IActivityProvider"/>s.
 5/// </summary>
 226public class ActivityRegistryPopulator(IEnumerable<IActivityProvider> providers, IActivityRegistry registry) : IActivity
 7{
 8    /// <inheritdoc />
 9    public async Task PopulateRegistryAsync(CancellationToken cancellationToken)
 10    {
 211        await registry.RefreshDescriptorsAsync(providers, cancellationToken);
 212    }
 13
 14    /// <inheritdoc />
 15    public async Task EnsureRegistryPopulatedAsync(CancellationToken cancellationToken)
 16    {
 30017        foreach (var provider in providers)
 11218            await registry.EnsureDescriptorsAsync(provider, cancellationToken);
 3819    }
 20}