< Summary

Information
Class: Elsa.Workflows.StorageDriverManager
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Services/StorageDriverManager.cs
Line coverage
66%
Covered lines: 2
Uncovered lines: 1
Coverable lines: 3
Total lines: 18
Line coverage: 66.6%
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%
Get(...)100%11100%
List()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Services/StorageDriverManager.cs

#LineLine coverage
 1namespace Elsa.Workflows;
 2
 3/// <inheritdoc />
 4public class StorageDriverManager : IStorageDriverManager
 5{
 6    private readonly IEnumerable<IStorageDriver> _drivers;
 7
 8    /// <summary>
 9    /// Constructor.
 10    /// </summary>
 84211    public StorageDriverManager(IEnumerable<IStorageDriver> drivers) => _drivers = drivers;
 12
 13    /// <inheritdoc />
 60914    public IStorageDriver? Get(Type type) => _drivers.FirstOrDefault(x => x.GetType() == type);
 15
 16    /// <inheritdoc />
 017    public IEnumerable<IStorageDriver> List() => _drivers;
 18}