예제 #1
0
 /// <summary>
 /// 搜索树节点
 /// </summary>
 /// <param name="getId"></param>
 /// <param name="idToSearch"></param>
 /// <returns></returns>
 public TreeItemHolder <T> Search(Func <T, string> getId, string idToSearch)
 {
     return(TreeItemHelper.Search(this, getId, idToSearch));
 }
예제 #2
0
 /// <summary>
 /// 搜索孩子节点
 /// </summary>
 /// <param name="getId"></param>
 /// <param name="idToSearch"></param>
 /// <param name="recursive"></param>
 /// <returns></returns>
 public TreeItemHolder <T> SearchChild(Func <T, string> getId, string idToSearch, bool recursive)
 {
     return(TreeItemHelper.SearchChild(this, getId, idToSearch, recursive));
 }
예제 #3
0
 /// <summary>
 /// 转化数据结构为树型容器
 /// </summary>
 /// <param name="treeItems"></param>
 /// <param name="getId"></param>
 /// <param name="getParentId"></param>
 /// <param name="parentId"></param>
 /// <returns></returns>
 public static List <TreeItemHolder <T> > ConvertToHolders(IList <T> treeItems, Func <T, string> getId, Func <T, string> getParentId, string parentId = null)
 {
     return(TreeItemHelper.ConvertToHolders(treeItems, getId, getParentId, parentId));
 }