< Summary

Information
Class: Elsa.Workflows.Activities.Flowchart.Models.ObsoleteConnection
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/ObsoleteConnection.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 17
Coverable lines: 17
Total lines: 60
Line coverage: 0%
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%210%
.ctor(...)100%210%
get_Source()100%210%
get_Target()100%210%
get_SourcePort()100%210%
get_TargetPort()100%210%
Deconstruct(...)100%210%

File(s)

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

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace Elsa.Workflows.Activities.Flowchart.Models;
 4
 5/// <summary>
 6/// A connection between a source and target activity via the source out port to the target in port.
 7/// </summary>
 8[Obsolete("Use Connection instead.")]
 9public class ObsoleteConnection
 10{
 11    /// <summary>
 12    /// Initializes a new instance of the <see cref="ObsoleteConnection"/> class.
 13    /// </summary>
 14    [JsonConstructor]
 015    public ObsoleteConnection()
 16    {
 017    }
 18
 19    /// <summary>
 20    /// Initializes a new instance of the <see cref="ObsoleteConnection"/> class.
 21    /// </summary>
 022    public ObsoleteConnection(IActivity source, IActivity target, string? sourcePort = null, string? targetPort = null)
 23    {
 024        Source = source;
 025        Target = target;
 026        SourcePort = sourcePort;
 027        TargetPort = targetPort;
 028    }
 29
 30    /// <summary>
 31    /// The source activity.
 32    /// </summary>
 033    public IActivity Source { get; set; } = null!;
 34
 35    /// <summary>
 36    /// The target activity.
 37    /// </summary>
 038    public IActivity Target { get; set; } = null!;
 39
 40    /// <summary>
 41    /// The source port.
 42    /// </summary>
 043    public string? SourcePort { get; set; }
 44
 45    /// <summary>
 46    /// The target port.
 47    /// </summary>
 048    public string? TargetPort { get; set; }
 49
 50    /// <summary>
 51    /// Deconstructs the connection into its parts.
 52    /// </summary>
 53    public void Deconstruct(out IActivity source, out IActivity target, out string? sourcePort, out string? targetPort)
 54    {
 055        source = Source;
 056        target = Target;
 057        sourcePort = SourcePort;
 058        targetPort = TargetPort;
 059    }
 60}