Example #1
0
        public bool HasAncestor(DialogEntry parent)
        {
            if (parent == this || parent == null)
            {
                return(false);
            }

            if (Parent.EntryId == EntryId || Parent.HasAncestor(parent))
            {
                return(true);
            }

            return(false);
        }
Example #2
0
        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);
        }