|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LinqToTree
{
/// <summary>
/// Defines an adapter that must be implemented in order to use the LinqToTree
/// extension methods
/// </summary>
/// <typeparam name="T"></typeparam>
public interface ILinqToTree<T>
{
/// <summary>
/// Obtains all the children of the Item.
/// </summary>
/// <returns></returns>
IEnumerable<ILinqToTree<T>> Children();
/// <summary>
/// The parent of the Item.
/// </summary>
ILinqToTree<T> Parent { get; }
/// <summary>
/// The item being adapted.
/// </summary>
T Item { get; }
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.