< Summary

Information
Class: Elsa.Identity.Providers.StoreBasedRoleProvider
Assembly: Elsa.Identity
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Identity/Providers/StoreBasedRoleProvider.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 29
Line coverage: 0%
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%210%
FindManyAsync()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Identity/Providers/StoreBasedRoleProvider.cs

#LineLine coverage
 1using Elsa.Identity.Contracts;
 2using Elsa.Identity.Entities;
 3using Elsa.Identity.Models;
 4using JetBrains.Annotations;
 5
 6namespace Elsa.Identity.Providers;
 7
 8/// <summary>
 9/// Represents a provider of roles that uses <see cref="IRoleStore"/>.
 10/// </summary>
 11[PublicAPI]
 12public class StoreBasedRoleProvider : IRoleProvider
 13{
 14    private readonly IRoleStore _roleStore;
 15
 16    /// <summary>
 17    /// Initializes a new instance of the <see cref="StoreBasedRoleProvider"/> class.
 18    /// </summary>
 019    public StoreBasedRoleProvider(IRoleStore roleStore)
 20    {
 021        _roleStore = roleStore;
 022    }
 23
 24    /// <inheritdoc />
 25    public async ValueTask<IEnumerable<Role>> FindManyAsync(RoleFilter filter, CancellationToken cancellationToken = def
 26    {
 027        return await _roleStore.FindManyAsync(filter, cancellationToken);
 028    }
 29}