private string CreateFragmentLinkForType(string cref) { if (string.IsNullOrWhiteSpace(cref)) { return string.Empty; } var typeName = SlashdocIdentifierProvider.GetTypeName(cref); if (typeName == null) { if (cref.Length > 2 && cref[1] == ':') { return cref.Substring(2); } else { return string.Empty; } } var type = _assemblyReflector.LookupType(typeName); if (type != null) { return string.Format( CultureInfo.InvariantCulture, "<a href=\"#{0}\">{1}</a>", XmlEscape(_language.GetDisplayName(type)), XmlEscape(_language.GetShortDisplayName(type))); } else { return XmlEscape(typeName); } }
public void DescribeAssembly(IAssemblyReflector assembly) { var formatter = new SlashdocSummaryHtmlFormatter(assembly, _language); var title = string.Format(CultureInfo.InvariantCulture, "{0} public API reference", assembly.SimpleName); WriteTextElement("h1", title); WriteTypesOverviewTable(assembly, formatter); foreach (var type in assembly.Types .Where(t => ReflectionHelper.IsVisible(t)) .OrderBy(t => _language.GetShortDisplayName(t))) { DescribeType(type, formatter); } }