private List <IConnectorConflictRow> GetConnectorConflictRows(ConflictRowList list, IToolConflictItem currentConflictItem, IToolConflictItem diffConflictItem, ConflictTreeNode current, ConflictTreeNode diff) { var rows = new List <IConnectorConflictRow>(); int index = 0; var armConnectorsCurrent = new List <(string Description, string Key, string SourceUniqueId, string DestinationUniqueId)>(); var armConnectorsDiff = new List <(string Description, string Key, string SourceUniqueId, string DestinationUniqueId)>(); SetConnectorConflict(current, diff, out armConnectorsCurrent, out armConnectorsDiff, out int maxCount); for (; index < maxCount; index++) { row = new ConnectorConflictRow(); row.CurrentArmConnector = new ConnectorConflictItem.Empty(row.UniqueId); if (armConnectorsCurrent != null && index < armConnectorsCurrent.Count) { SetCurrentConnectorConflict(armConnectorsCurrent[index], list, currentConflictItem); } row.DifferentArmConnector = new ConnectorConflictItem.Empty(row.UniqueId); if (armConnectorsDiff != null && index < armConnectorsDiff.Count) { SetDiffConnectorConflict(armConnectorsDiff[index], list, diffConflictItem); } var sameSourceAndDestination = row.CurrentArmConnector.SourceUniqueId != row.DifferentArmConnector.SourceUniqueId || row.CurrentArmConnector.DestinationUniqueId != row.DifferentArmConnector.DestinationUniqueId; row.HasConflict = sameSourceAndDestination; rows.Add(row); } return(rows); }
IList <IConnectorConflictRow> CreateStartNodeConnectors(IToolConflictItem currentConflictItem, IToolConflictItem differentConflictItem, ConflictTreeNode current, ConflictTreeNode diff) { const string key = "Start"; var emptyGuid = Guid.Empty; var row = new ConnectorConflictRow { Key = key, ContainsStart = true }; if (current == null) { row.CurrentArmConnector = new ConnectorConflictItem.Empty(emptyGuid); } else { var connector = new ConnectorConflictItem(this, Column.Current, row.UniqueId, "Start -> " + current.Activity.GetDisplayName(), emptyGuid, Guid.Parse(current.UniqueId), key); row.CurrentArmConnector = connector; currentConflictItem.OutboundConnectors.Add(connector); } if (diff == null) { row.DifferentArmConnector = new ConnectorConflictItem.Empty(emptyGuid); } else { var connector = new ConnectorConflictItem(this, Column.Different, row.UniqueId, "Start -> " + diff.Activity.GetDisplayName(), emptyGuid, Guid.Parse(diff.UniqueId), key); row.DifferentArmConnector = connector; differentConflictItem.OutboundConnectors.Add(connector); } return(new List <IConnectorConflictRow> { row }); }