/// <summary> /// Build predicate selecting descendants for tree entry of given element. /// </summary> /// <param name="item">element to select ancestors for. </param> /// <param name="depth">Max inheritance level. </param> /// <param name="includeSelf">Whether or not to add element itself to result. </param> /// <returns>Predicate selecting descendants of element. </returns> public static TreeFilter DescendantsOf(IHasTreeEntry item, int depth, bool includeSelf) => DescendantsOf(item.TreeEntry, depth, includeSelf);
/// <summary> /// Build predicate selecting sibling element positioned next to tree entry of given element. /// </summary> /// <param name="item">Element to select next sibling for. </param> /// <returns>Predicate selecting next siblings of element. </returns> public static TreeFilter NextSiblingOf(IHasTreeEntry item) => NextSiblingOf(item.TreeEntry);
/// <summary> /// Build predicate selecting ancestors for tree entry of given element. /// </summary> /// <param name="item">element to select ancestors for. </param> /// <param name="depth">Max inheritance level. </param> /// <param name="includeSelf">Whether or not to add element itself to result. </param> /// <returns>Predicate selecting ancestors of element. </returns> public static TreeFilter AncestorsOf(IHasTreeEntry item, int depth, bool includeSelf) => AncestorsOf(item.TreeEntry, depth, includeSelf);
/// <summary> /// Build predicate selecting siblings positioned after tree entry of given element. /// </summary> /// <param name="item">Element to select siblings for. </param> /// <param name="includeSelf">Whether or not to add element itself to result. </param> /// <returns>Predicate selecting siblings positioned after element. </returns> public static TreeFilter SiblingsAfter(IHasTreeEntry item, bool includeSelf) => SiblingsAfter(item.TreeEntry, includeSelf);