Beispiel #1
0
        public Article(IUserBasic author, ArticleGroupThread articleGroupThread, ArticleStatus articleStatus, ArticleType articleType, string subject, string formattedBody, string urlFriendlyName, bool isApproved, List <string> tags, List <KeyValuePair <string, string> > tripleTags, List <string> contentLevelNodeNames)
        {
            this._CMSContent = new CMSContent(author.UserId, articleGroupThread.CMSThread, (byte)articleStatus
                                              , (byte)articleType, subject, formattedBody, isApproved);

            this.ArticleGroupThread = articleGroupThread;

            _CMSContent.CMSExtraInfo       = new XElement("i");
            _CMSContent.CMSParentContentId = null;
            _CMSContent.CMSContentLevel    = 0;
            _CMSContent.UrlFriendlyName    = urlFriendlyName;

            this.ContentLevelNodeNames = (contentLevelNodeNames ?? new List <string>());
            this.Tags = (tags ?? new List <string>());
            if (tripleTags != null)
            {
                this.AddTripleTagsToTagCollection(tripleTags);
            }
        }
Beispiel #2
0
        internal Article(CMSContent cmsContent, CMSThread cmsThread, CMSSection cmsSection, List <string> tags, List <string> contentLevelNodeNames)
        {
            this._CMSContent = cmsContent;

            if (cmsThread != null)
            {
                this.ArticleGroupThread = new ArticleGroupThread(cmsThread, cmsSection);
            }

            if (cmsContent.CMSExtraInfo == null)
            {
                cmsContent.CMSExtraInfo = new XElement("i");
            }

            this.ContentLevelNodeNames = (contentLevelNodeNames ?? new List <string>());
            this.Tags = (tags ?? new List <string>());
            List <KeyValuePair <string, string> > tripleTags = new List <KeyValuePair <string, string> >();
            List <string> tags2 = new List <string>();

            TagHelper.FormatTags(this.Tags, out tags2, out tripleTags);
            this.Tags        = tags2;
            this._TripleTags = tripleTags;
            this.AddTripleTagsToTagCollection(this._TripleTags);
        }
Beispiel #3
0
 public Article(IUserBasic author, ArticleGroupThread articleGroupThread, ArticleStatus articleStatus, ArticleType articleType, string subject, string formattedBody, string urlFriendlyName, bool isApproved)
     : this(author, articleGroupThread, articleStatus, articleType, subject, formattedBody, urlFriendlyName, isApproved, null, null, null)
 {
 }