コード例 #1
0
        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 />");
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public abstract string EmitHtml(string sectionContent, PageEmitter emitter);