< 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: 37
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.Resilience.ShellFeatures;
 5using Elsa.Workflows.Runtime.Distributed.StartupTasks;
 6using Elsa.Workflows.Runtime.ShellFeatures;
 7using Elsa.Platform.PackageManifest.Generator.Hints;
 8using JetBrains.Annotations;
 9using Microsoft.Extensions.DependencyInjection.Extensions;
 10using Microsoft.Extensions.DependencyInjection;
 11
 12namespace Elsa.Workflows.Runtime.Distributed.ShellFeatures;
 13
 14/// <summary>
 15/// Installs and configures distributed workflow runtime features.
 16/// </summary>
 17[ManifestFeatureCategory("Workflows")]
 18[ManifestFeatureCategory("Infrastructure")]
 19[ShellFeature(
 20    DisplayName = "Distributed Runtime",
 21    Description = "Provides distributed workflow runtime capabilities",
 22    DependsOn = [typeof(WorkflowRuntimeFeature), typeof(ResilienceFeature)])]
 23[UsedImplicitly]
 24public class DistributedRuntimeFeature : IShellFeature
 25{
 26    public void ConfigureServices(IServiceCollection services)
 27    {
 028        services
 029            .AddScoped<DistributedWorkflowRuntime>()
 030            .AddScoped<IWorkflowRuntime>(sp => sp.GetRequiredService<DistributedWorkflowRuntime>())
 031            .AddScoped<DistributedBookmarkQueueWorker>()
 032            .AddScoped<IBookmarkQueueWorker>(sp => sp.GetRequiredService<DistributedBookmarkQueueWorker>());
 33
 034        services.TryAddScoped<DistributedRuntimeLockProviderValidator>();
 035        services.TryAddEnumerable(ServiceDescriptor.Scoped<IStartupTask, ValidateDistributedRuntimeLockProviderStartupTa
 036    }
 37}