private void RemoveTag(string tag) { CLVBaseNode parent = m_componentsLibrary.GetNode(tag); if (parent == null) { throw new InvalidOperationException(); } parent.RemoveChild(this); m_parents.Remove(parent); }
private void RemoveEmptySubTag(string[] tags, int index, CLVBaseNode parent) { if (index < tags.Length) { var found = parent.AllChildren.FirstOrDefault(o => { return(o.Label.Equals(tags[index], StringComparison.CurrentCultureIgnoreCase)); }); if (found != null) { RemoveEmptySubTag(tags, index++, found); if (found.AllChildren.Count == 0) { parent.RemoveChild(found); } } } }
private void RemoveEmptySubTag(string[] tags, int index, CLVBaseNode parent) { if (index < tags.Length) { var found = parent.AllChildren.FirstOrDefault(o => { return o.Label.Equals(tags[index], StringComparison.CurrentCultureIgnoreCase); }); if (found != null) { RemoveEmptySubTag(tags, index++, found); if (found.AllChildren.Count == 0) { parent.RemoveChild(found); } } } }