public string GetUriSuffix() { Contract.Requires(Uri.IsWellFormedUriString(Href, UriKind.Absolute)); var uriSuffix = Href.Substring(Href.IndexOf("/api", StringComparison.InvariantCultureIgnoreCase) + 4); return(uriSuffix); }
public TableOfContentsEntry(string id, string text, int order, string href) { Id = id ?? throw new ArgumentNullException(nameof(id)); Text = text ?? throw new ArgumentNullException(nameof(text)); Order = order; Href = href ?? throw new ArgumentNullException(nameof(href)); var idx = Href.IndexOf('#'); if (idx != -1) { Href = Href.Substring(0, idx); } }