public TypeLinkAndBuilder(Type type) { var typeName = DocVisitor.FormatType(type); typeName = "[" + DocGenUtil.HtmlEscape(typeName) + "](" + DocVisitor.GetTypeID(type) + ".md)"; this.TypeLink = typeName; this.Builder = new StringBuilder(); }
public TypeLinkAndBuilder(Type type) { var typeName = DocVisitor.FormatType(type); typeName = typeName.Replace("&", "&"); typeName = typeName.Replace("<", "<"); typeName = typeName.Replace(">", ">"); typeName = "[" + typeName + "](" + DocVisitor.GetTypeID(type) + ".md)"; this.TypeLink = typeName; this.Builder = new StringBuilder(); }
public void Finish() { this.writer.Write("## API Documentation\r\n\r\n"); foreach (var key in this.docs.Keys) { var finalString = this.docs[key].ToString(); var typeName = DocVisitor.FormatType(key); typeName = typeName.Replace("&", "&"); typeName = typeName.Replace("<", "<"); typeName = typeName.Replace(">", ">"); typeName = "[" + typeName + "](" + DocVisitor.GetTypeID(key) + ".md)"; if (finalString.IndexOf(".", StringComparison.Ordinal) >= 0) { finalString = finalString.Substring( 0, finalString.IndexOf(".", StringComparison.Ordinal) + 1); } finalString = Regex.Replace(finalString, @"\r?\n(\r?\n)+", "\r\n\r\n"); this.writer.Write(" * " + typeName + " - "); this.writer.WriteLine(finalString); } }