< Summary

Information
Class: Elsa.Workflows.WorkflowGraphBuilder
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Services/WorkflowGraphBuilder.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 19
Line coverage: 100%
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
.ctor(...)100%11100%
BuildAsync()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Services/WorkflowGraphBuilder.cs

#LineLine coverage
 1using Elsa.Extensions;
 2using Elsa.Workflows.Activities;
 3using Elsa.Workflows.Models;
 4
 5namespace Elsa.Workflows;
 6
 7/// <inheritdoc />
 8518public class WorkflowGraphBuilder(IActivityVisitor activityVisitor, IIdentityGraphService identityGraphService) : IWorkf
 9{
 10    /// <inheritdoc />
 11    public async Task<WorkflowGraph> BuildAsync(Workflow workflow, CancellationToken cancellationToken = default)
 12    {
 198213        var graph = await activityVisitor.VisitAsync(workflow, cancellationToken);
 198214        var nodes = graph.Flatten().ToList();
 15
 198216        await identityGraphService.AssignIdentitiesAsync(nodes);
 198217        return new WorkflowGraph(workflow, graph, nodes);
 198218    }
 19}