public string EmitHtml(string className) { var shortClassName = className[0].ToString().ToLower(); return($"<div id=\"var-{Name}\">" + $"{PageEmitter.GetImg("variable", "Variable")} <b>{Name}</b><br /><br />" + $"<code>Type: <span class=\"arg-type\">{TypeHelper.LinkType(Type)}</span></code>" + $"<code>Usage:<br />" + $"- get: <span class=\"arg-type\">var</span> {Name} = {shortClassName}.{Name};<br />" + $"- set: {shortClassName}.{Name} = {Name};</code></div><hr />"); }
public override string EmitHtml(string sectionContent, PageEmitter emitter) { var methods = GetGlobalFunctions().OrderBy(m => m.Name).ToArray(); var methodsText = ""; foreach (var method in methods) { methodsText += method.EmitHtml("") + Environment.NewLine; } var methodList = "<ul>" + string.Join(Environment.NewLine, methods .Select(m => $"<li>{PageEmitter.GetImg("method") + PageEmitter.GetImg("static")} <a href=\"#method-{m.Name}\">{m.Name}</a></li>")) + "</ul>"; var content = emitter.FillTemplate(sectionContent, ("METHODLIST", methodList), ("METHODS", methodsText)); return(content); }
public abstract string EmitHtml(string sectionContent, PageEmitter emitter);