public CommentNode[] GetCommentNodes(PostItem item) { List <CommentNode> nodes = new List <CommentNode>(); foreach (Comment comment in item.Post.Comments.Top) { CommentNode cn = new CommentNode(comment); cn.Nodes.Add(""); nodes.Add(cn); } return(nodes.ToArray()); }
public CommentNode[] GetCommentNodes(CommentNode commentNode) { List <CommentNode> nodes = new List <CommentNode>(); foreach (Comment comment in commentNode.Comment.Replies) { //nodes.Add(new CommentNode(comment)); CommentNode cn = new CommentNode(comment); cn.Nodes.Add(""); nodes.Add(cn); } return(nodes.ToArray()); }