Exemple #1
0
        private IEnumerable <HtmlPage> ToHtmlPages(IEnumerable <BlogDemoorDetailData> details, int skip = 0)
        {
            int index = 1 + skip;

            foreach (BlogDemoorDetailData detail in details)
            {
                HtmlPage htmlPage = ToHtmlPage(detail);
                htmlPage.Index = index++;
                yield return(htmlPage);
            }
        }
Exemple #2
0
        // bool export = false
        private IEnumerable <OXmlElement> PageToOXmlElements(HtmlPage htmlPage, Dictionary <string, NamedValues <ZValue> > imagePatches = null)
        {
            //elements = elements.Union(GetTitle(page.Date + " : " + page.Title));
            IEnumerable <OXmlElement> elements = GetTitle(string.Format(_frCulture, "{0:dd MMMM}", htmlPage.Date) + " : " + htmlPage.Title);

            elements = elements.Union(_htmlToOXmlElements.ToOXmlXElements(htmlPage.HtmlNodes, htmlPage.WebImages, htmlPage.SourceUrl, imagePatches));
            //if (export)
            if ((_options & OXmlDocOptions.ExportOXmlPage) == OXmlDocOptions.ExportOXmlPage)
            {
                ExportOXml(htmlPage, elements);
            }
            return(elements);
        }