/// <summary> /// Create a deep copy of every child renderer and add them to the passed /// <see cref="AbstractBranchSvgNodeRenderer"/> /// </summary> /// <param name="deepCopy">renderer to add copies of children to</param> protected internal void DeepCopyChildren(AbstractBranchSvgNodeRenderer deepCopy) { foreach (ISvgNodeRenderer child in children) { ISvgNodeRenderer newChild = child.CreateDeepCopy(); child.SetParent(deepCopy); deepCopy.AddChild(newChild); } }
public override bool Equals(Object other) { if (other == null || this.GetType() != other.GetType()) { return(false); } AbstractBranchSvgNodeRenderer oabr = (AbstractBranchSvgNodeRenderer)other; bool result = base.Equals(oabr); if (result) { result &= Enumerable.SequenceEqual(children, oabr.GetChildren()); } return(result); }