Exemplo n.º 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>();
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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));
     }
 }
Exemplo n.º 6
0
 public Article(int id, string title, ArticleType articleType)
 {
     Id          = id;
     Title       = title;
     ArticleType = articleType;
 }
Exemplo n.º 7
0
 public void ChangeArticleType(ArticleType articleType)
 {
     this.ArticleType = articleType;
 }