Exemple #1
0
        /// <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(SingleLineComment 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 = 2;
                if (headerLineText.Length > 2 && headerLineText[2] == ' ')
                {
                    startIndex = 3;
                }

                headerLineText = headerLineText.Substring(startIndex, headerLineText.Length - startIndex);
            }

            return(headerLineText);
        }
Exemple #2
0
        /// <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(SingleLineComment 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 = 2;
                if (headerLineText.Length > 2 && headerLineText[2] == ' ')
                {
                    startIndex = 3;
                }

                headerLineText = headerLineText.Substring(startIndex, headerLineText.Length - startIndex);
            }

            return headerLineText;
        }