< Summary

Information
Class: Elsa.Features.Services.InstalledFeatureRegistry
Assembly: Elsa.Features
File(s): /home/runner/work/elsa-core/elsa-core/src/common/Elsa.Features/Services/InstalledFeatureRegistry.cs
Line coverage
50%
Covered lines: 2
Uncovered lines: 2
Coverable lines: 4
Total lines: 19
Line coverage: 50%
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
.ctor()100%11100%
Add(...)100%11100%
List()100%210%
Find(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/common/Elsa.Features/Services/InstalledFeatureRegistry.cs

#LineLine coverage
 1using Elsa.Features.Contracts;
 2using Elsa.Features.Models;
 3
 4namespace Elsa.Features.Services;
 5
 6/// <inheritdoc />
 7public class InstalledFeatureRegistry : IInstalledFeatureRegistry
 8{
 19    private readonly Dictionary<string, FeatureDescriptor> _descriptors = new();
 10
 11    /// <inheritdoc />
 4412    public void Add(FeatureDescriptor descriptor) => _descriptors[descriptor.FullName] = descriptor;
 13
 14    /// <inheritdoc />
 015    public IEnumerable<FeatureDescriptor> List() => _descriptors.Values;
 16
 17    /// <inheritdoc />
 018    public FeatureDescriptor? Find(string fullName) => _descriptors.GetValueOrDefault(fullName);
 19}