< Summary

Information
Class: Elsa.Identity.Providers.StoreBasedUserProvider
Assembly: Elsa.Identity
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Identity/Providers/StoreBasedUserProvider.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%
FindAsync()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Identity/Providers/StoreBasedUserProvider.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 user provider that finds users using <see cref="IUserStore"/>.
 10/// </summary>
 11[PublicAPI]
 12public class StoreBasedUserProvider : IUserProvider
 13{
 14    private readonly IUserStore _userStore;
 15
 16    /// <summary>
 17    /// Initializes a new instance of the <see cref="StoreBasedUserProvider"/> class.
 18    /// </summary>
 019    public StoreBasedUserProvider(IUserStore userStore)
 20    {
 021        _userStore = userStore;
 022    }
 23
 24    /// <inheritdoc />
 25    public async Task<User?> FindAsync(UserFilter filter, CancellationToken cancellationToken = default)
 26    {
 027        return await _userStore.FindAsync(filter, cancellationToken);
 028    }
 29}