< 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: 39
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;
 10
 11namespace Elsa.Workflows.ShellFeatures;
 12
 13/// <summary>
 14/// Adds support for the Flowchart activity.
 15/// </summary>
 16[ShellFeature(
 17    DisplayName = "Flowchart",
 18    Description = "Adds support for the Flowchart activity")]
 19[UsedImplicitly]
 20public class FlowchartFeature : IShellFeature
 21{
 22    /// <summary>
 23    /// A delegate to configure <see cref="FlowchartOptions"/>.
 24    /// </summary>
 025    public Action<FlowchartOptions>? FlowchartOptionsConfigurator { get; set; }
 26
 27    public void ConfigureServices(IServiceCollection services)
 28    {
 029        services.AddSerializationOptionsConfigurator<FlowchartSerializationOptionConfigurator>();
 30
 31        // Register FlowchartOptions
 032        services.AddOptions<FlowchartOptions>();
 33
 034        if (FlowchartOptionsConfigurator != null)
 035            services.Configure(FlowchartOptionsConfigurator);
 36
 037        services.Configure<SerializationTypeOptions>(options => options.AddTypeAlias<FlowScope>("FlowScope"));
 038    }
 39}