Пример #1
0
 private ContentTreeNode FindTreeNode(ContentTreeNode parent, string segment)
 {
     return (from treeNode in treeNodes
             where treeNode.Parent == parent
             where treeNode.Segment.Equals(segment, StringComparison.InvariantCultureIgnoreCase)
             select treeNode).FirstOrDefault();
 }
Пример #2
0
 private static void SetTreeNodeParent(ContentTreeNode treeNode, IEnumerable<ContentTreeNode> treeNodes)
 {
     treeNode.Parent = treeNodes.SingleOrDefault(t => t.Id.Equals(treeNode.ParentId));
 }