< Summary

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

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Features/WorkflowInstancesFeature.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/// Enables storage of workflow instances.
 10/// </summary>
 111public class WorkflowInstancesFeature(IModule module) : FeatureBase(module)
 12{
 13    /// <summary>
 14    /// The factory to create new instances of <see cref="IWorkflowInstanceStore"/>.
 15    /// </summary>
 316    public Func<IServiceProvider, IWorkflowInstanceStore> WorkflowInstanceStore { get; set; } = sp => sp.GetRequiredServ
 17
 18    /// <inheritdoc />
 19    public override void Apply()
 20    {
 121        Services.AddScoped(WorkflowInstanceStore);
 122    }
 23}