< Summary

Information
Class: Elsa.Workflows.Management.Features.WorkflowDefinitionsFeature
Assembly: Elsa.Workflows.Management
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Features/WorkflowDefinitionsFeature.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 24
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
.ctor(...)100%11100%
get_WorkflowDefinitionStore()100%11100%
Apply()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Features/WorkflowDefinitionsFeature.cs

#LineLine coverage
 1using Elsa.Features.Abstractions;
 2using Elsa.Features.Services;
 3using Elsa.Workflows.Management.Stores;
 4using Microsoft.Extensions.DependencyInjection;
 5
 6namespace Elsa.Workflows.Management.Features;
 7
 8/// <summary>
 9/// Configures workflow definition storage.
 10/// </summary>
 111public class WorkflowDefinitionsFeature(IModule module) : FeatureBase(module)
 12{
 13    /// <summary>
 14    /// The factory to create new instances of <see cref="IWorkflowDefinitionStore"/>.
 15    /// </summary>
 316    public Func<IServiceProvider, IWorkflowDefinitionStore> WorkflowDefinitionStore { get; set; } = sp => sp.GetRequired
 17
 18    /// <inheritdoc />
 19    public override void Apply()
 20    {
 121        Services
 122            .AddScoped(WorkflowDefinitionStore);
 123    }
 24}