public static void PasteSegment(
            ushort targetSegmentID, MoveItSegmentData data, Dictionary <InstanceID, InstanceID> map)
        {
            Log.Debug($"MoveItIntegration.PasteSegment({targetSegmentID}) called with record = " + data);
            if (data == null)
            {
                // doing this is not backward comatible:
                //segEndMan.ResetSegmentEndToDefault(segmentId, true);
                //segEndMan.ResetSegmentEndToDefault(segmentId, false);
            }
            else
            {
                var segEnd1 = data.Start;
                if (segEnd1 != null)
                {
                    ushort nodeID = MappedNodeID(map, segEnd1.NodeID);
                    PasteSegmentEnd(segEnd1, targetSegmentID, nodeID);
                }

                var segEnd2 = data.End;
                if (segEnd2 != null)
                {
                    ushort nodeID = MappedNodeID(map, segEnd2.NodeID);
                    PasteSegmentEnd(segEnd2, targetSegmentID, nodeID);
                }
            }
        }
        public static MoveItSegmentData CopySegment(ushort sourceSegmentID)
        {
            var ret = new MoveItSegmentData {
                Start = segEndMan.GetAt(segmentID: sourceSegmentID, startNode: true)?.Clone(),
                End   = segEndMan.GetAt(segmentID: sourceSegmentID, startNode: false)?.Clone()
            };

            if (ret.Start == null && ret.End == null)
            {
                return(null);
            }

            return(ret.LogRet($"MoveItIntegration.CopySegment({sourceSegmentID}) -> "));
        }
 public static void PasteSegment(
     ushort targetSegmentID, MoveItSegmentData data, Dictionary <InstanceID, InstanceID> map)
 {
     Log.Debug($"MoveItIntegration.PasteSegment({targetSegmentID}) called with record = " + data);
     if (data == null)
     {
         // doing this is not backward comatible:
         //segEndMan.ResetSegmentEndToDefault(segmentId, true);
         //segEndMan.ResetSegmentEndToDefault(segmentId, false);
     }
     else
     {
         PasteSegmentEnd(segmentEndData: data.Start, targetSegmentID: targetSegmentID, map: map);
         PasteSegmentEnd(segmentEndData: data.End, targetSegmentID: targetSegmentID, map: map);
     }
 }