public bool HasAncestor(DialogEntry parent) { if (parent == this || parent == null) { return(false); } if (Parent.EntryId == EntryId || Parent.HasAncestor(parent)) { return(true); } return(false); }
public bool HasDescendant(DialogEntry entry) { if (entry == this) { return(false); } if (Children != null) { foreach (DialogEntry child in Children) { if (child.EntryId == EntryId || child.HasDescendant(entry)) { return(true); } } } return(false); }