示例#1
0
        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());
        }
示例#2
0
        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());
        }