| | | 1 | | using Elsa.Workflows.Activities.Flowchart.Models; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Workflows.Activities.Flowchart.Extensions; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Contains extension methods for <see cref="ICollection{Connection}"/>. |
| | | 7 | | /// </summary> |
| | | 8 | | public static class ConnectionsExtensions |
| | | 9 | | { |
| | | 10 | | extension(ICollection<Connection> connections) |
| | | 11 | | { |
| | | 12 | | /// <summary> |
| | | 13 | | /// Returns all inbound connections of the specified activity. |
| | | 14 | | /// </summary> |
| | 2289 | 15 | | 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> |
| | 0 | 20 | | public IEnumerable<IActivity> InboundActivities(IActivity activity) => connections.InboundConnections(activity).S |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// Returns all outbound connections of the specified activity. |
| | | 24 | | /// </summary> |
| | 3529 | 25 | | 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> |
| | 0 | 30 | | public IEnumerable<Connection> OutboundConnections(IActivity activity, Outcomes outcomes) => connections.Outbound |
| | | 31 | | |
| | | 32 | | /// <summary> |
| | | 33 | | /// Returns all outbound activities of the specified activity. |
| | | 34 | | /// </summary> |
| | 0 | 35 | | 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> |
| | 0 | 40 | | public IEnumerable<IActivity> OutboundActivities(IActivity activity, Outcomes outcomes) => connections.OutboundCo |
| | | 41 | | } |
| | | 42 | | } |