Exemplo n.º 1
0
        /// <summary>
        /// A simplified method of creating a HTML (or any document) from an
        /// RSS Feed. See <see cref="RssHtmlMaker">RssHtmlMaker</see>
        /// </summary>
        /// <param name="Feed">The <see cref="RssFeed">RssFeed</see> object to
        /// get the tokens' data from.</param>
        /// <param name="Template">The overall HTML template (or any other format)
        /// to replace the tokens in.</param>
        /// <param name="ItemPrefix">A string template that is prepended to the beginning
        /// of each RSS item.</param>
        /// <param name="ItemSuffix">A string template that is apppended to the end
        /// of each RSS item.</param>
        /// <param name="MaxItems">The maximum number of RSS items to display.</param>
        /// <returns>A string with the templates provided parsed of their tokens, with
        /// the data values in their place.</returns>
        public static string CreateHtml(RssFeed Feed, string Template, string ItemPrefix, string ItemSuffix, int MaxItems)
        {
            RssHtmlMaker rssHtmlMaker = new RssHtmlMaker();

            rssHtmlMaker.MaxItems = MaxItems;
            return(rssHtmlMaker.GetHtmlContents(Feed, Template, ItemPrefix, ItemSuffix));
        }
Exemplo n.º 2
0
		/// <summary>
		/// A simplified method of creating a HTML (or any document) from an
		/// RSS Feed. See <see cref="RssHtmlMaker">RssHtmlMaker</see>
		/// </summary>
		/// <param name="Feed">The <see cref="RssFeed">RssFeed</see> object to
		/// get the tokens' data from.</param>
		/// <param name="Template">The overall HTML template (or any other format)
		/// to replace the tokens in.</param>
		/// <param name="ItemPrefix">A string template that is prepended to the beginning
		/// of each RSS item.</param>
		/// <param name="ItemSuffix">A string template that is apppended to the end
		/// of each RSS item.</param>
		/// <param name="MaxItems">The maximum number of RSS items to display.</param>
		/// <returns>A string with the templates provided parsed of their tokens, with
		/// the data values in their place.</returns>
		public static string CreateHtml(RssFeed Feed,string Template,string ItemPrefix,string ItemSuffix,int MaxItems)
		{
			RssHtmlMaker rssHtmlMaker = new RssHtmlMaker();
			rssHtmlMaker.MaxItems = MaxItems;
			return rssHtmlMaker.GetHtmlContents(Feed,Template,ItemPrefix,ItemSuffix);
		}