Beispiel #1
0
 /// <summary>
 /// If the graph <c>target</c> has parent, it will move to its level (one level closer to the root)
 /// </summary>
 /// <param name="target">The graph that is moving</param>
 /// <param name="flags">The operation flags</param>
 /// <returns></returns>
 public static IGraphNode RetreatToParent(this IGraphNode target, graphOperationFlag flags = graphOperationFlag.mergeOnSameName)
 {
     if (target.parent != null)
     {
         return(target.MoveTo(target.parent, flags));
     }
     return(target);
 }