public void PlaceAfter(IDualLinkNode <TEntity> sourceNode, IDualLinkNode <TEntity> targetNode) { DualLinkNode <TEntity> source = FindNode(sourceNode); DualLinkNode <TEntity> target = FindNode(targetNode); if (source != target) { target.AttachAfter(source); RealignEnds(); } }
public IDualLinkNode <TEntity> AddAfter(IDualLinkNode <TEntity> suppliedNode, TEntity entity) { DualLinkNode <TEntity> sourceNode = FindNode(suppliedNode); DualLinkNode <TEntity> newNode = new DualLinkNode <TEntity>(this, entity); if (sourceNode != null) { newNode.AttachAfter(sourceNode); } AddElement(newNode); return(newNode); }