< Summary

Information
Class: Elsa.Extensions.ServiceCollectionExtensions
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Extensions/ServiceCollectionExtensions.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 21
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
AddStorageDriver(...)100%11100%
AddActivityStateFilter(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Extensions/ServiceCollectionExtensions.cs

#LineLine coverage
 1using Elsa.Workflows;
 2using Microsoft.Extensions.DependencyInjection;
 3
 4// ReSharper disable once CheckNamespace
 5namespace Elsa.Extensions;
 6
 7public static class ServiceCollectionExtensions
 8{
 9    extension(IServiceCollection services)
 10    {
 11        public IServiceCollection AddStorageDriver<T>() where T : class, IStorageDriver
 12        {
 34213            return services.AddScoped<IStorageDriver, T>();
 14        }
 15
 16        public IServiceCollection AddActivityStateFilter<T>() where T : class, IActivityStateFilter
 17        {
 118            return services.AddScoped<IActivityStateFilter, T>();
 19        }
 20    }
 21}