/// <summary> /// Visits the <c>a</c> extended documentation element. /// </summary> /// public override void VisitAnchor(Anchor anchor) { string url = DistributionManager.GetDocumentationUrl(anchor.Href); string text = parse(anchor.Href, false); if (!String.IsNullOrEmpty(anchor.Content)) { text = anchor.Content; } builder.Append(hyperlink(url, text)); }
/// <summary> /// Visits the <c>see</c> documentation element. /// </summary> /// public override void VisitSee(See see) { string url = DistributionManager.GetDocumentationUrl(see.Cref); string text = parse(see.Cref, false); if (!String.IsNullOrEmpty(see.Content)) { text = see.Content; } builder.Append(hyperlink(url, text)); }
/// <summary> /// Visits the <c>seealso</c> documentation element. /// </summary> /// public override void VisitSeeAlso(SeeAlso seeAlso) { string url = DistributionManager.GetDocumentationUrl(seeAlso.Cref); string text = parse(seeAlso.Cref, false); var hyperlink = new HyperlinkViewModel() { Url = url, Text = text }; if (!String.IsNullOrEmpty(seeAlso.Content)) { hyperlink.Text = seeAlso.Content; } current.SeeAlso.Add(hyperlink); }
/// <summary> /// Gets the name of the distribution modeled by a given Accord.NET type. /// The name is returned in a normalized form (i.e. given a type whose name /// is NormalDistribution, the function would return "Normal"). /// </summary> /// public static string GetDistributionName(Type type) { // Extract the real distribution name from the class name string name = DistributionManager.Normalize(type.Name); if (name.Contains('`')) { name = name.Remove(name.IndexOf("`")); } // Remove the trailing "Distribution" from the name if (name.EndsWith("Distribution")) { name = name.Remove(name.IndexOf("Distribution")); } return(name.Trim()); }