< Summary

Information
Class: Elsa.Workflows.ShellFeatures.FlowchartFeature
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/ShellFeatures/FlowchartFeature.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 41
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_FlowchartOptionsConfigurator()100%210%
ConfigureServices(...)0%620%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/ShellFeatures/FlowchartFeature.cs

#LineLine coverage
 1using CShells.Features;
 2using Elsa.Extensions;
 3using Elsa.Workflows.Activities.Flowchart.Models;
 4using Elsa.Workflows.Activities.Flowchart.Options;
 5using Elsa.Workflows.Activities.Flowchart.Serialization;
 6using Elsa.Workflows.Options;
 7using JetBrains.Annotations;
 8using Microsoft.Extensions.DependencyInjection;
 9using Elsa.Common.Serialization;
 10using Elsa.Platform.PackageManifest.Generator.Hints;
 11
 12namespace Elsa.Workflows.ShellFeatures;
 13
 14/// <summary>
 15/// Adds support for the Flowchart activity.
 16/// </summary>
 17[ManifestFeatureCategory("Workflows")]
 18[ShellFeature(
 19    DisplayName = "Flowchart",
 20    Description = "Adds support for the Flowchart activity")]
 21[UsedImplicitly]
 22public class FlowchartFeature : IShellFeature
 23{
 24    /// <summary>
 25    /// A delegate to configure <see cref="FlowchartOptions"/>.
 26    /// </summary>
 027    public Action<FlowchartOptions>? FlowchartOptionsConfigurator { get; set; }
 28
 29    public void ConfigureServices(IServiceCollection services)
 30    {
 031        services.AddSerializationOptionsConfigurator<FlowchartSerializationOptionConfigurator>();
 32
 33        // Register FlowchartOptions
 034        services.AddOptions<FlowchartOptions>();
 35
 036        if (FlowchartOptionsConfigurator != null)
 037            services.Configure(FlowchartOptionsConfigurator);
 38
 039        services.Configure<SerializationTypeOptions>(options => options.AddTypeAlias<FlowScope>("FlowScope"));
 040    }
 41}