public override string ToString() { if (!IsVisible) { return(string.Empty); } var html = new SelfClosingHtmlWriter(new StringWriter(), string.Empty); beforeStartingMainTag(html); addMainTagAttributes(); renderCustomAttributes(html); html.RenderBeginTag(theMainTagIs()); beforeMainTagInnerText(html); var text = theMainTagInnerTextIs(); if (text != null) { if (UnEncoded) { html.Write(text); } else { html.WriteEncodedText(text); } } beforeEndingMainTag(html); html.EndRender(); return(html.InnerWriter.ToString()); }
public override string ToString() { if (!IsVisible) return string.Empty; var html = new SelfClosingHtmlWriter(new StringWriter(), string.Empty); beforeStartingMainTag(html); addMainTagAttributes(); renderCustomAttributes(html); html.RenderBeginTag(theMainTagIs()); beforeMainTagInnerText(html); var text = theMainTagInnerTextIs(); if (text != null) { if (UnEncoded) html.Write(text); else html.WriteEncodedText(text); } beforeEndingMainTag(html); html.EndRender(); return html.InnerWriter.ToString(); }