| | | 1 | | using System.Text.Json.Serialization; |
| | | 2 | | |
| | | 3 | | namespace 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.")] |
| | | 9 | | public class ObsoleteConnection |
| | | 10 | | { |
| | | 11 | | /// <summary> |
| | | 12 | | /// Initializes a new instance of the <see cref="ObsoleteConnection"/> class. |
| | | 13 | | /// </summary> |
| | | 14 | | [JsonConstructor] |
| | 0 | 15 | | public ObsoleteConnection() |
| | | 16 | | { |
| | 0 | 17 | | } |
| | | 18 | | |
| | | 19 | | /// <summary> |
| | | 20 | | /// Initializes a new instance of the <see cref="ObsoleteConnection"/> class. |
| | | 21 | | /// </summary> |
| | 0 | 22 | | public ObsoleteConnection(IActivity source, IActivity target, string? sourcePort = null, string? targetPort = null) |
| | | 23 | | { |
| | 0 | 24 | | Source = source; |
| | 0 | 25 | | Target = target; |
| | 0 | 26 | | SourcePort = sourcePort; |
| | 0 | 27 | | TargetPort = targetPort; |
| | 0 | 28 | | } |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// The source activity. |
| | | 32 | | /// </summary> |
| | 0 | 33 | | public IActivity Source { get; set; } = null!; |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// The target activity. |
| | | 37 | | /// </summary> |
| | 0 | 38 | | public IActivity Target { get; set; } = null!; |
| | | 39 | | |
| | | 40 | | /// <summary> |
| | | 41 | | /// The source port. |
| | | 42 | | /// </summary> |
| | 0 | 43 | | public string? SourcePort { get; set; } |
| | | 44 | | |
| | | 45 | | /// <summary> |
| | | 46 | | /// The target port. |
| | | 47 | | /// </summary> |
| | 0 | 48 | | 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 | | { |
| | 0 | 55 | | source = Source; |
| | 0 | 56 | | target = Target; |
| | 0 | 57 | | sourcePort = SourcePort; |
| | 0 | 58 | | targetPort = TargetPort; |
| | 0 | 59 | | } |
| | | 60 | | } |