Summary description for CategoryWriter.
Inheritance: RssWriter
コード例 #1
0
        /// <summary>
        /// Builds the feed using delta encoding if it's true.
        /// </summary>
        /// <returns></returns>
        protected override CachedFeed BuildFeed()
        {
            CachedFeed feed = null;

            _posts = GetFeedEntries();

            if (_posts != null && _posts.Count > 0)
            {
                feed = new CachedFeed();
                var cw = new CategoryWriter(new StringWriter(), _posts, Category,
                                            Url.CategoryUrl(Category).ToFullyQualifiedUrl(Blog), SubtextContext);
                feed.LastModifiedUtc = _posts.First().DateCreatedUtc;
                feed.Xml             = cw.Xml;
            }
            return(feed);
        }
コード例 #2
0
        /// <summary>
        /// Builds the feed using delta encoding if it's true.
        /// </summary>
        /// <returns></returns>
        protected override CachedFeed BuildFeed()
        {
            CachedFeed feed = null;

            _posts = GetFeedEntries();

            if (_posts != null && _posts.Count > 0)
            {
                feed = new CachedFeed();
                var cw = new CategoryWriter(HttpContext.Response.Output, _posts, Category,
                                            Url.CategoryUrl(Category).ToFullyQualifiedUrl(Blog), SubtextContext);
                feed.LastModified = ConvertLastUpdatedDate(_posts.First().DateCreated);
                feed.Xml          = cw.Xml;
            }
            return(feed);
        }