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(); }
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()); }
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 ""; }
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(""); }
public String GetHtml(String field, DocumentLinkResolver resolver, HtmlSerializer serializer) { Fragment fragment = Get(field); return(WithFragments.GetHtml(fragment, resolver, serializer)); }
public String GetHtml(String field, DocumentLinkResolver resolver, HtmlSerializer serializer) { Fragment fragment = Get(field); return WithFragments.GetHtml(fragment, resolver, serializer); }