< Summary

Information
Class: Elsa.Workflows.Activities.Flowchart.Extensions.ConnectionsExtensions
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Extensions/ConnectionsExtensions.cs
Line coverage
33%
Covered lines: 2
Uncovered lines: 4
Coverable lines: 6
Total lines: 42
Line coverage: 33.3%
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
InboundConnections(...)100%11100%
InboundActivities(...)100%210%
OutboundConnections(...)100%11100%
OutboundConnections(...)100%210%
OutboundActivities(...)100%210%
OutboundActivities(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Extensions/ConnectionsExtensions.cs

#LineLine coverage
 1using Elsa.Workflows.Activities.Flowchart.Models;
 2
 3namespace Elsa.Workflows.Activities.Flowchart.Extensions;
 4
 5/// <summary>
 6/// Contains extension methods for <see cref="ICollection{Connection}"/>.
 7/// </summary>
 8public static class ConnectionsExtensions
 9{
 10   extension(ICollection<Connection> connections)
 11   {
 12       /// <summary>
 13       /// Returns all inbound connections of the specified activity.
 14       /// </summary>
 228915       public IEnumerable<Connection> InboundConnections(IActivity activity) => connections.Where(x => x.Target.Activity
 16
 17       /// <summary>
 18       /// Returns all inbound activities of the specified activity.
 19       /// </summary>
 020       public IEnumerable<IActivity> InboundActivities(IActivity activity) => connections.InboundConnections(activity).S
 21
 22       /// <summary>
 23       /// Returns all outbound connections of the specified activity.
 24       /// </summary>
 352925       public IEnumerable<Connection> OutboundConnections(IActivity activity) => connections.Where(x => x.Source.Activit
 26
 27       /// <summary>
 28       /// Returns all outbound connections of the specified activity matching the specified outcomes.
 29       /// </summary>
 030       public IEnumerable<Connection> OutboundConnections(IActivity activity, Outcomes outcomes) => connections.Outbound
 31
 32       /// <summary>
 33       /// Returns all outbound activities of the specified activity.
 34       /// </summary>
 035       public IEnumerable<IActivity> OutboundActivities(IActivity activity) => connections.OutboundConnections(activity)
 36
 37       /// <summary>
 38       /// Returns all outbound activities of the specified activity matching the specified outcomes
 39       /// </summary>
 040       public IEnumerable<IActivity> OutboundActivities(IActivity activity, Outcomes outcomes) => connections.OutboundCo
 41   }
 42}