/// <summary>
        /// Returns a collection containing this element and all descendant elements.
        /// </summary>
        public static IEnumerable <ILinqToTree <T> > DescendantsAndSelf <T>(this ILinqToTree <T> adapter)
        {
            yield return(adapter);

            foreach (var child in adapter.Descendants())
            {
                yield return(child);
            }
        }
 /// <summary>
 /// Returns a collection of descendant elements.
 /// </summary>
 public static IEnumerable <ILinqToTree <T> > Descendants <T, K>(this ILinqToTree <T> adapter)
 {
     return(adapter.Descendants().Where(i => i.Item is K));
 }