WriteFeed() public méthode

Writes a generated syndication feed that conforms to the supplied SyndicationFormat using the supplied Stream and collection.
public WriteFeed ( SyndicationFormat format, Stream stream, List publishables, string title ) : void
format SyndicationFormat /// A enumeration value indicating the syndication format to generate. ///
stream Stream /// The to which you want to write the syndication feed. ///
publishables List /// The collection of objects used to generate the syndication feed content. ///
title string /// The title of the RSS channel ///
Résultat void
        /// <summary>
        /// Enables processing of HTTP Web requests by a custom HttpHandler that implements 
        /// the <see cref="T:System.Web.IHttpHandler"></see> interface.
        /// </summary>
        /// <param name="context">An <see cref="T:System.Web.HttpContext"></see> object that provides references 
        /// to the intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests.
        /// </param>
        public void ProcessRequest(HttpContext context)
        {
            string title = RetrieveTitle(context);
            SyndicationFormat format = RetrieveFormat(context);
            List<IPublishable> list = GenerateItemList(context);
            list = CleanList(list);

            if (string.IsNullOrEmpty(context.Request.QueryString["post"]))
            {
                // Shorten the list to the number of posts stated in the settings, except for the comment feed.
                int max = Math.Min(BlogSettings.Instance.PostsPerFeed, list.Count);
                list = list.FindAll(delegate(IPublishable item)
                {
                    return item.IsVisible == true;
                });

                list = list.GetRange(0, max);
            }

            SetHeaderInformation(context, list, format);

            if (BlogSettings.Instance.EnableHttpCompression)
                HttpModules.CompressionModule.CompressResponse(context);

            SyndicationGenerator generator = new SyndicationGenerator(BlogSettings.Instance, Category.Categories);
            generator.WriteFeed(format, context.Response.OutputStream, list, title);
        }