public static IEnumerable <AspxNode> DescendantsAndSelf(this AspxNode item) { yield return(item); foreach (var child in item.Descendants()) { yield return(child); } }
public static IEnumerable <T> Descendants <T>(this AspxNode item) { return(item.Descendants().Where(i => i is T).Cast <T>()); }