< Summary

Information
Class: Elsa.ExternalAuthentication.Services.DefaultPermissionDescriptorRegistry
Assembly: Elsa.ExternalAuthentication
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.ExternalAuthentication/Services/DefaultPermissionDescriptorRegistry.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 17
Line coverage: 100%
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%
List()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.ExternalAuthentication/Services/DefaultPermissionDescriptorRegistry.cs

#LineLine coverage
 1using Elsa.ExternalAuthentication.Contracts;
 2using Elsa.ExternalAuthentication.Models;
 3
 4namespace Elsa.ExternalAuthentication.Services;
 5
 66public sealed class DefaultPermissionDescriptorRegistry(IEnumerable<IPermissionDescriptorProvider> providers) : IPermiss
 7{
 68    private readonly IReadOnlyCollection<PermissionDescriptor> _descriptors = providers
 29        .SelectMany(x => x.GetDescriptors())
 210        .Where(x => !string.IsNullOrWhiteSpace(x.Name))
 211        .GroupBy(x => x.Name, StringComparer.Ordinal)
 212        .Select(x => x.First())
 213        .OrderBy(x => x.Name, StringComparer.Ordinal)
 614        .ToArray();
 15
 816    public IReadOnlyCollection<PermissionDescriptor> List() => _descriptors;
 17}