|
@@ -2,13 +2,20 @@
|
|
|
|
|
|
namespace Masuit.Tools.Models;
|
|
|
|
|
|
-public class Tree<T>
|
|
|
+/// <summary>
|
|
|
+/// 代表树形结构的类
|
|
|
+/// </summary>
|
|
|
+/// <typeparam name="T"></typeparam>
|
|
|
+public class Tree<T> : ITreeChildren<Tree<T>>
|
|
|
{
|
|
|
public Tree(T value)
|
|
|
{
|
|
|
- Value = value;
|
|
|
+ this.Value = value;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 代表当前节点的值
|
|
|
+ /// </summary>
|
|
|
public T Value { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
@@ -20,4 +27,4 @@ public class Tree<T>
|
|
|
/// 子级
|
|
|
/// </summary>
|
|
|
public virtual ICollection<Tree<T>> Children { get; set; }
|
|
|
-}
|
|
|
+}
|