/// <summary> /// Extracts the raw text from a header line. /// </summary> /// <param name="headerLine">The header line.</param> /// <returns>Returns the raw text.</returns> private static string ExtractHeaderLineText(ElementHeaderLine headerLine) { Param.AssertNotNull(headerLine, "headerLine"); string headerLineText = headerLine.Text; if (headerLineText.StartsWith("///", StringComparison.Ordinal)) { // Typically, the header line will begin with a single space after the three slashes. We should not // consider this space to be part of the documentation, so skip past it. int startIndex = 3; if (headerLineText.Length > 3 && headerLineText[3] == ' ') { startIndex = 4; } headerLineText = headerLineText.Substring(startIndex, headerLineText.Length - startIndex); } return(headerLineText); }
/// <summary> /// Extracts the raw text from a header line. /// </summary> /// <param name="headerLine">The header line.</param> /// <returns>Returns the raw text.</returns> private static string ExtractHeaderLineText(ElementHeaderLine headerLine) { Param.AssertNotNull(headerLine, "headerLine"); string headerLineText = headerLine.Text; if (headerLineText.StartsWith("///", StringComparison.Ordinal)) { // Typically, the header line will begin with a single space after the three slashes. We should not // consider this space to be part of the documentation, so skip past it. int startIndex = 3; if (headerLineText.Length > 3 && headerLineText[3] == ' ') { startIndex = 4; } headerLineText = headerLineText.Substring(startIndex, headerLineText.Length - startIndex); } return headerLineText; }
/// <summary> /// Returns the net count of opening and closing code elements for the token provided. /// </summary> /// <param name="headerLine">The xml header line.</param> /// <returns>The net count of open and close code elements.</returns> private static int XmlHeaderLineCodeElementCount(ElementHeaderLine headerLine) { Param.AssertNotNull(headerLine, "headerLine"); string lineText = headerLine.Text; int openCodeTagCount = CountOfStringInStringOccurrences(lineText, "<code>"); int closeCodeTagCount = CountOfStringInStringOccurrences(lineText, "</code>"); return openCodeTagCount - closeCodeTagCount; }