Example #1
0
 public CommentView(Comment comment)
 {
     Author = comment.Author;
     Email = comment.Email;
     CreatedOn = comment.CreatedOn;
     Body = comment.Body;
     Url = comment.URL;
     ParentID=comment.ParentID;
     Replies=new List<CommentView>();
     ID=comment.CommentID;
 }
Example #2
0
        static void ImportComments(ulong postID)
        {
            var comments = wp_comment.All().Where(x => x.comment_approved == "1" && x.comment_post_ID==postID);
            foreach (var comment in comments){
                Write("Adding comment from "+comment.comment_author);

                Comment c=new Comment();
                c.CommentID = (int)comment.comment_ID;
                c.PostID = (int)comment.comment_post_ID;
                c.Author = comment.comment_author;
                c.IP = comment.comment_author_IP;
                c.Email = comment.comment_author_email;
                c.URL = comment.comment_author_url;
                c.CreatedOn = comment.comment_date;
                c.Body = comment.comment_content;
                c.ParentID = (int)comment.comment_parent;
                c.Add();
            }
        }
Example #3
0
 public static void Setup(int testItems)
 {
     SetTestRepo();
     for(int i=0;i<testItems;i++){
         Comment item=new Comment();
         _testRepo._items.Add(item);
     }
 }
Example #4
0
 public static void Setup(Comment item)
 {
     SetTestRepo();
     _testRepo._items.Add(item);
 }