private static void RenderParametersSection(IEnumerable<StoredProcedureParameter> parameters, HtmlBuilder html) { html.div().attCls("section"); html.h4("Parameters"); if (parameters.Count() > 0) { html.e("ul").attCls("sp-parameters"); foreach (var p in parameters) html.e("li").text(p.Name.TrimStart('@')).c(); html.c(); // ul } else html.text("This stored procedure does not receive parameters."); html.c(); // section }
private void RenderMethodParametersAndReturnsSummary(HtmlBuilder html, Method m, ReferenceContext referenceContext) { if (m.Parameters != null && m.Parameters.Count > 0) { html.div().attCls("section"); html.h4("Parameters:"); html.e("ul").attCls("method-params"); foreach (var p in m.Parameters) { html.e("li").paramName(p.Name).text(": ").typeName(p.TypeName, referenceContext); RenderExtendedSummary(p, html, referenceContext); html.c(); //li } html.c(); //ul html.c(); //div } if (m.TypeName != null && m.TypeName != "Void" && m.TypeName != "System.Void") { html.div().attCls("section"); html.h4("Returns:"); html.e("ul").attCls("method-params") .e("li").typeName(m.TypeName, referenceContext); RenderSummary(m.ReturnDescription, html, referenceContext); html.c();//c html.c(); //ul html.c(); //div } }
private void RenderDescriptionNode(DescriptionSegment el, HtmlBuilder html, ReferenceContext referenceContext) { switch (el.Type) { case DescriptionSegmentType.Text: html.text(el.Text); break; case DescriptionSegmentType.SeeAlso: case DescriptionSegmentType.See: html.typeName(el.Text, el.Ref, referenceContext); break; case DescriptionSegmentType.Paragraph: html.p(); html.text(el.Text); RenderExtendedSummary(el.Children, html, referenceContext); html.c(); break; case DescriptionSegmentType.Bold: html.e("b").text(el.Text); RenderExtendedSummary(el.Children, html, referenceContext); html.c(); break; case DescriptionSegmentType.Header: html.h4(el.Text); break; case DescriptionSegmentType.Italic: html.e("i").text(el.Text); RenderExtendedSummary(el.Children, html, referenceContext); html.c(); break; case DescriptionSegmentType.Strong: html.e("strong").text(el.Text); RenderExtendedSummary(el.Children, html, referenceContext); html.c(); break; case DescriptionSegmentType.Example: html.div().attCls("example"); html.text(el.Text); RenderExtendedSummary(el.Children, html, referenceContext); html.c(); break; case DescriptionSegmentType.Code: html.e("pre"); html.text(el.Text); RenderExtendedSummary(el.Children, html, referenceContext); html.c(); break; case DescriptionSegmentType.Html: html.text(el.Text, false); break; } }