< 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: 6
Coverable lines: 6
Total lines: 35
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.Options;
 4using Elsa.Workflows.Activities.Flowchart.Serialization;
 5using JetBrains.Annotations;
 6using Microsoft.Extensions.DependencyInjection;
 7
 8namespace Elsa.Workflows.ShellFeatures;
 9
 10/// <summary>
 11/// Adds support for the Flowchart activity.
 12/// </summary>
 13[ShellFeature(
 14    DisplayName = "Flowchart",
 15    Description = "Adds support for the Flowchart activity")]
 16[UsedImplicitly]
 17public class FlowchartFeature : IShellFeature
 18{
 19    /// <summary>
 20    /// A delegate to configure <see cref="FlowchartOptions"/>.
 21    /// </summary>
 022    public Action<FlowchartOptions>? FlowchartOptionsConfigurator { get; set; }
 23
 24    public void ConfigureServices(IServiceCollection services)
 25    {
 026        services.AddSerializationOptionsConfigurator<FlowchartSerializationOptionConfigurator>();
 27
 28        // Register FlowchartOptions
 029        services.AddOptions<FlowchartOptions>();
 30
 031        if (FlowchartOptionsConfigurator != null)
 032            services.Configure(FlowchartOptionsConfigurator);
 033    }
 34}
 35