< 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: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 37
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.Workflows.Runtime.Features;
 6using Microsoft.Extensions.DependencyInjection;
 7
 8namespace Elsa.Workflows.Runtime.Distributed.Features;
 9
 10/// <summary>
 11/// Installs and configures workflow runtime features.
 12/// </summary>
 13[DependsOn(typeof(WorkflowRuntimeFeature))]
 14public class DistributedRuntimeFeature : FeatureBase
 15{
 16    /// <inheritdoc />
 117    public DistributedRuntimeFeature(IModule module) : base(module)
 18    {
 119    }
 20
 21    public override void Configure()
 22    {
 123        Module.UseWorkflowRuntime(runtime =>
 124        {
 12525            runtime.WorkflowRuntime = sp => sp.GetRequiredService<DistributedWorkflowRuntime>();
 126            runtime.BookmarkQueueWorker = sp => sp.GetRequiredService<DistributedBookmarkQueueWorker>();
 227        });
 128    }
 29
 30    /// <inheritdoc />
 31    public override void Apply()
 32    {
 133        Services
 134            .AddScoped<DistributedWorkflowRuntime>()
 135            .AddScoped<DistributedBookmarkQueueWorker>();
 136    }
 37}