< Summary

Information
Class: Elsa.Extensions.RoleProviderExtensions
Assembly: Elsa.Identity
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Identity/Extensions/RoleProviderExtensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
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
FindByIdsAsync()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Identity/Extensions/RoleProviderExtensions.cs

#LineLine coverage
 1using Elsa.Identity.Contracts;
 2using Elsa.Identity.Entities;
 3using Elsa.Identity.Models;
 4
 5// ReSharper disable once CheckNamespace
 6namespace Elsa.Extensions;
 7
 8/// <summary>
 9/// Provides extensions for <see cref="IRoleProvider"/>.
 10/// </summary>
 11public static class RoleProviderExtensions
 12{
 13    /// <summary>
 14    /// Finds the roles with the specified IDs.
 15    /// </summary>
 16    /// <param name="roleProvider">The role provider.</param>
 17    /// <param name="ids">The IDs to filter for.</param>
 18    /// <param name="cancellationToken">The cancellation token.</param>
 19    /// <returns>The roles with the specified IDs.</returns>
 20    public static async Task<IEnumerable<Role>> FindByIdsAsync(this IRoleProvider roleProvider, IEnumerable<string> ids,
 21    {
 022        var filter = new RoleFilter()
 023        {
 024            Ids = ids.Distinct().ToList()
 025        };
 26
 027        return await roleProvider.FindManyAsync(filter, cancellationToken);
 028    }
 29}

Methods/Properties

FindByIdsAsync()