< Summary

Information
Class: Elsa.Workflows.Runtime.Distributed.Features.DistributedRuntimeFeature
Assembly: Elsa.Workflows.Runtime.Distributed
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime.Distributed/Features/DistributedRuntimeFeature.cs
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 34
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%
Configure()100%11100%
Apply()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime.Distributed/Features/DistributedRuntimeFeature.cs

#LineLine coverage
 1using Elsa.Extensions;
 2using Elsa.Features.Abstractions;
 3using Elsa.Features.Attributes;
 4using Elsa.Features.Services;
 5using Elsa.Resilience.Features;
 6using Elsa.Workflows.Runtime.Features;
 7using Microsoft.Extensions.DependencyInjection;
 8
 9namespace Elsa.Workflows.Runtime.Distributed.Features;
 10
 11/// <summary>
 12/// Installs and configures workflow runtime features.
 13/// </summary>
 14[DependsOn(typeof(WorkflowRuntimeFeature))]
 15[DependsOn(typeof(ResilienceFeature))]
 916public class DistributedRuntimeFeature(IModule module) : FeatureBase(module)
 17{
 18    public override void Configure()
 19    {
 920        Module.UseWorkflowRuntime(runtime =>
 921        {
 48622            runtime.WorkflowRuntime = sp => sp.GetRequiredService<DistributedWorkflowRuntime>();
 1123            runtime.BookmarkQueueWorker = sp => sp.GetRequiredService<DistributedBookmarkQueueWorker>();
 1824        });
 925    }
 26
 27    /// <inheritdoc />
 28    public override void Apply()
 29    {
 930        Services
 931            .AddScoped<DistributedWorkflowRuntime>()
 932            .AddScoped<DistributedBookmarkQueueWorker>();
 933    }
 34}