< Summary

Information
Class: Elsa.Platform.Integration.ShellFeatures.ElsaPlatformIntegrationFeature
Assembly: Elsa.Platform.Integration
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Platform.Integration/ShellFeatures/ElsaPlatformIntegrationFeature.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 29
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.Platform.Integration/ShellFeatures/ElsaPlatformIntegrationFeature.cs

#LineLine coverage
 1using CShells.Features;
 2using Elsa.Platform.Integration.Options;
 3using Elsa.Platform.Integration.Services;
 4using Elsa.Platform.PackageManifest.Generator.Hints;
 5using Elsa.Workflows.Management.ShellFeatures;
 6using JetBrains.Annotations;
 7using Microsoft.Extensions.DependencyInjection;
 8
 9namespace Elsa.Platform.Integration.ShellFeatures;
 10
 11[ManifestFeatureCategory("Integrations")]
 12[ShellFeature(
 13    DisplayName = "Elsa Platform Integration",
 14    Description = "Polls Elsa Platform deployment commands and applies Loom recipe artifacts to this Elsa runtime",
 15    DependsOn = [typeof(WorkflowManagementFeature)])]
 16[UsedImplicitly]
 17public class ElsaPlatformIntegrationFeature : IShellFeature
 18{
 19    public void ConfigureServices(IServiceCollection services)
 20    {
 021        services.AddOptions<ElsaPlatformIntegrationOptions>()
 022            .BindConfiguration(ElsaPlatformIntegrationOptions.ConfigurationSection);
 23
 024        services.AddHttpClient<IPlatformRuntimeCommandClient, PlatformRuntimeCommandClient>();
 025        services.AddSingleton<IShellConfigurationOverlayStore, FileShellConfigurationOverlayStore>();
 026        services.AddScoped<IPlatformRecipeArtifactApplier, ElsaLoomRecipeArtifactApplier>();
 027        services.AddHostedService<ElsaPlatformDeploymentWorker>();
 028    }
 29}