Пример #1
0
 public Article(string title, ArticleType articleType, string content)
 {
     this.Title           = title;
     this.ArticleType     = articleType;
     this.Content         = content;
     this.CreateTime      = DateTimeOffset.Now;
     this.Hits            = 0;
     this.ArticleMessages = new List <ArticleMessage>();
 }
Пример #2
0
 public Article(int id, string author, string title, string textSection, string content, ArticleType articleType, bool isDraft, bool isSendEmail)
 {
     Id          = id;
     Title       = title;
     ArticleType = articleType;
     Author      = author;
     Content     = content;
     IsDraft     = isDraft;
     TextSection = textSection;
     IsSendEmail = isSendEmail;
 }
Пример #3
0
 public Article(int id, string title, string author, string textSection, ArticleType articleType, bool isDraft, int praiseCount, int browserCount, string commentIds, DateTime createTime)
 {
     Id           = id;
     Title        = title;
     Author       = author;
     ArticleType  = articleType;
     TextSection  = textSection;
     IsDraft      = isDraft;
     PraiseCount  = praiseCount;
     BrowserCount = browserCount;
     CommentIds   = commentIds;
     CreateTime   = createTime;
 }
Пример #4
0
 public Article(int id, string author, string title, string textSection, string content, ArticleType articleType, bool isDraft, int praiseCount, int browserCount, DateTime createTime, DateTime?updateTime)
 {
     Id           = id;
     Title        = title;
     TextSection  = textSection;
     ArticleType  = articleType;
     Author       = author;
     Content      = content;
     IsDraft      = isDraft;
     PraiseCount  = praiseCount;
     BrowserCount = browserCount;
     CreateTime   = createTime;
     UpdateTime   = updateTime;
 }
Пример #5
0
 public Article(int id, string title, string author, string content, ArticleType articleType, bool isDraft, IList <Comment> comments, DateTime createTime)
 {
     Id          = id;
     Title       = title;
     Author      = author;
     ArticleType = articleType;
     Content     = content;
     IsDraft     = isDraft;
     CreateTime  = createTime;
     Comments    = comments;
     if (comments != null)
     {
         CommentIds = string.Join(',', comments.Select(s => s.Guid));
     }
 }
Пример #6
0
 public Article(int id, string title, ArticleType articleType)
 {
     Id          = id;
     Title       = title;
     ArticleType = articleType;
 }
Пример #7
0
 public void ChangeArticleType(ArticleType articleType)
 {
     this.ArticleType = articleType;
 }