< Summary

Information
Class: Elsa.Workflows.Runtime.Distributed.ShellFeatures.DistributedRuntimeFeature
Assembly: Elsa.Workflows.Runtime.Distributed
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime.Distributed/ShellFeatures/DistributedRuntimeFeature.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 32
Line coverage: 0%
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
ConfigureServices(...)100%210%

File(s)

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

#LineLine coverage
 1using CShells.Features;
 2using Elsa.Common;
 3using Elsa.Extensions;
 4using Elsa.Workflows.Runtime.Distributed.StartupTasks;
 5using JetBrains.Annotations;
 6using Microsoft.Extensions.DependencyInjection;
 7using Microsoft.Extensions.DependencyInjection.Extensions;
 8
 9namespace Elsa.Workflows.Runtime.Distributed.ShellFeatures;
 10
 11/// <summary>
 12/// Installs and configures distributed workflow runtime features.
 13/// </summary>
 14[ShellFeature(
 15    DisplayName = "Distributed Runtime",
 16    Description = "Provides distributed workflow runtime capabilities",
 17    DependsOn = ["WorkflowRuntime", "Resilience"])]
 18[UsedImplicitly]
 19public class DistributedRuntimeFeature : IShellFeature
 20{
 21    public void ConfigureServices(IServiceCollection services)
 22    {
 023        services
 024            .AddScoped<DistributedWorkflowRuntime>()
 025            .AddScoped<IWorkflowRuntime>(sp => sp.GetRequiredService<DistributedWorkflowRuntime>())
 026            .AddScoped<DistributedBookmarkQueueWorker>()
 027            .AddScoped<IBookmarkQueueWorker>(sp => sp.GetRequiredService<DistributedBookmarkQueueWorker>());
 28
 029        services.TryAddScoped<DistributedRuntimeLockProviderValidator>();
 030        services.TryAddEnumerable(ServiceDescriptor.Scoped<IStartupTask, ValidateDistributedRuntimeLockProviderStartupTa
 031    }
 32}