< Summary

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

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_FlowchartOptionsConfigurator()100%11100%
Apply()100%22100%
Configure()100%11100%

File(s)

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

#LineLine coverage
 1using Elsa.Extensions;
 2using Elsa.Features.Abstractions;
 3using Elsa.Features.Services;
 4using Elsa.Workflows.Activities.Flowchart.Models;
 5using Elsa.Workflows.Activities.Flowchart.Options;
 6using Elsa.Workflows.Activities.Flowchart.Serialization;
 7using Microsoft.Extensions.DependencyInjection;
 8
 9namespace Elsa.Workflows.Features;
 10
 11/// <summary>
 12/// Adds support for the Flowchart activity.
 13/// </summary>
 14public class FlowchartFeature : FeatureBase
 15{
 16    /// <inheritdoc />
 12917    public FlowchartFeature(IModule module) : base(module)
 18    {
 12919    }
 20
 21    /// <summary>
 22    /// A delegate to configure <see cref="FlowchartOptions"/>.
 23    /// </summary>
 14324    public Action<FlowchartOptions>? FlowchartOptionsConfigurator { get; set; }
 25
 26    /// <inheritdoc />
 27    public override void Apply()
 28    {
 12929        Services.AddSerializationOptionsConfigurator<FlowchartSerializationOptionConfigurator>();
 30
 31        // Register FlowchartOptions
 12932        Services.AddOptions<FlowchartOptions>();
 33
 12934        if (FlowchartOptionsConfigurator != null)
 735            Services.Configure(FlowchartOptionsConfigurator);
 12936    }
 37
 38    public override void Configure()
 39    {
 12940        Module.AddTypeAlias<FlowScope>("FlowScope");
 12941    }
 42}