mh_frame_sps/APT.Infrastructure.Core/Structs/TreeNode.cs

34 lines
706 B
C#
Raw Permalink Normal View History

2026-04-07 13:47:52 +08:00
using System.Collections.Generic;
using System.Linq;
namespace APT.Infrastructure.Core
{
/// <summary>
/// 树结构
/// </summary>
/// <typeparam name="T"></typeparam>
public class TreeNode<T> where T : class
{
/// <summary>
/// 节点
/// </summary>
public T Node { get; set; }
/// <summary>
/// 是否叶子节点
/// </summary>
public bool IsLeaf { get; set; }
/// <summary>
/// 层级
/// </summary>
public int Level { get; set; }
/// <summary>
/// 数据集合
/// </summary>
public List<TreeNode<T>> Children { get; set; }
}
}