예제 #1
0
        /// <inheritdoc />
        public void WriteToXmlStream(
            XmlStreamWriter writer)
        {
            var wpNs = FXNsRef.FromName("wp");

            var commentDateStr    = CommentDate.ToString("yyyy-MM-dd HH:mm:ss");
            var gmtCommentDateStr = CommentDateGMT.ToString("yyyy-MM-dd HH:mm:ss");

            writer.WriteStartElement(wpNs, "comment")
            .WriteInlineElement(wpNs, "comment_id", CommentId.ToString())
            .WriteInlineElement(wpNs, "comment_approved", "1")
            .WriteInlineElement(wpNs, "comment_author_email", AuthorEmail)
            .WriteInlineCDataElement(wpNs, "comment_author", Author)
            .WriteInlineElement(wpNs, "comment_author_url", "")
            .WriteInlineElement(wpNs, "comment_author_IP", AuthorIP)
            .WriteInlineElement(wpNs, "comment_date", commentDateStr)
            .WriteInlineElement(wpNs, "comment_date_gmt", gmtCommentDateStr)
            .WriteInlineCDataElement(wpNs, "comment_content", Content)
            .WriteInlineElement(wpNs, "comment_type", "")
            .WriteInlineElement(wpNs, "comment_parent", ParentId.ToString());

            writer.WriteEndElement();
        }
예제 #2
0
 public string MonthRU()
 {
     return(CommentDate.ToString("MMMM", CultureInfo.GetCultureInfo("ru-RU")));
 }