示例#1
0
 public String AsHtml(DocumentLinkResolver linkResolver, HtmlSerializer htmlSerializer)
 {
     String html = "";
     foreach(KeyValuePair<String,Fragment> fragment in Fragments) {
         html += ("<section data-field=\"" + fragment.Key + "\">");
         html += GetHtml(fragment.Key, linkResolver, htmlSerializer);
         html += ("</section>");
     }
     return html.Trim();
 }
示例#2
0
        public String AsHtml(DocumentLinkResolver linkResolver, HtmlSerializer htmlSerializer)
        {
            String html = "";

            foreach (KeyValuePair <String, Fragment> fragment in Fragments)
            {
                html += ("<section data-field=\"" + fragment.Key + "\">");
                html += GetHtml(fragment.Key, linkResolver, htmlSerializer);
                html += ("</section>");
            }
            return(html.Trim());
        }
示例#3
0
        public static String GetHtml(Fragment fragment, DocumentLinkResolver resolver, HtmlSerializer serializer)
        {
            if (fragment == null)
                return "";
            if (fragment is fragments.StructuredText) {
                return ((fragments.StructuredText)fragment).AsHtml(resolver, serializer);
            }
            if(fragment is fragments.Number) {
                return ((fragments.Number)fragment).AsHtml();
            }
            if(fragment is fragments.Color) {
                return ((fragments.Color)fragment).AsHtml();
            }
            if(fragment is fragments.Text) {
                return ((fragments.Text)fragment).AsHtml();
            }
            if(fragment is fragments.Date) {
                return ((fragments.Date)fragment).AsHtml();
            }
            if(fragment is fragments.Embed) {
                return ((fragments.Embed)fragment).AsHtml();
            }
            else if(fragment is fragments.Image) {
                return ((fragments.Image)fragment).AsHtml(resolver);
            }
            else if(fragment is fragments.WebLink) {
                return ((fragments.WebLink)fragment).AsHtml();
            }
            else if(fragment is fragments.DocumentLink) {
                return ((fragments.DocumentLink)fragment).AsHtml(resolver);
            }
            else if(fragment is fragments.Group) {
                return ((fragments.Group)fragment).AsHtml(resolver);
            }
            else if (fragment is fragments.SliceZone) {
                return ((fragments.SliceZone)fragment).AsHtml(resolver);
            }

            return "";
        }
示例#4
0
        public static String GetHtml(Fragment fragment, DocumentLinkResolver resolver, HtmlSerializer serializer)
        {
            if (fragment == null)
            {
                return("");
            }
            if (fragment is fragments.StructuredText)
            {
                return(((fragments.StructuredText)fragment).AsHtml(resolver, serializer));
            }
            if (fragment is fragments.Number)
            {
                return(((fragments.Number)fragment).AsHtml());
            }
            if (fragment is fragments.Color)
            {
                return(((fragments.Color)fragment).AsHtml());
            }
            if (fragment is fragments.Text)
            {
                return(((fragments.Text)fragment).AsHtml());
            }
            if (fragment is fragments.Date)
            {
                return(((fragments.Date)fragment).AsHtml());
            }
            if (fragment is fragments.Embed)
            {
                return(((fragments.Embed)fragment).AsHtml());
            }
            else if (fragment is fragments.Image)
            {
                return(((fragments.Image)fragment).AsHtml(resolver));
            }
            else if (fragment is fragments.WebLink)
            {
                return(((fragments.WebLink)fragment).AsHtml());
            }
            else if (fragment is fragments.DocumentLink)
            {
                return(((fragments.DocumentLink)fragment).AsHtml(resolver));
            }
            else if (fragment is fragments.Group)
            {
                return(((fragments.Group)fragment).AsHtml(resolver));
            }
            else if (fragment is fragments.SliceZone)
            {
                return(((fragments.SliceZone)fragment).AsHtml(resolver));
            }

            return("");
        }
示例#5
0
        public String GetHtml(String field, DocumentLinkResolver resolver, HtmlSerializer serializer)
        {
            Fragment fragment = Get(field);

            return(WithFragments.GetHtml(fragment, resolver, serializer));
        }
示例#6
0
 public String GetHtml(String field, DocumentLinkResolver resolver, HtmlSerializer serializer)
 {
     Fragment fragment = Get(field);
     return WithFragments.GetHtml(fragment, resolver, serializer);
 }