< Summary

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

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Identity/Extensions/ApplicationProviderExtensions.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="IApplicationProvider"/>.
 10/// </summary>
 11public static class ApplicationProviderExtensions
 12{
 13    /// <summary>
 14    /// Finds the application with the specified client ID.
 15    /// </summary>
 16    /// <param name="applicationProvider">The user provider.</param>
 17    /// <param name="clientId">The client ID to search by.</param>
 18    /// <param name="tenantAgnostic">Whether to bypass tenant scoping when resolving the application.</param>
 19    /// <param name="cancellationToken">The cancellation token.</param>
 20    /// <returns>The application with the specified client ID.</returns>
 21    public static async Task<Application?> FindByClientIdAsync(this IApplicationProvider applicationProvider, string cli
 22    {
 423        var filter = new ApplicationFilter
 424        {
 425            ClientId = clientId,
 426            TenantAgnostic = tenantAgnostic
 427        };
 28
 429        return await applicationProvider.FindAsync(filter, cancellationToken);
 430    }
 31}

Methods/Properties

FindByClientIdAsync()