Example #1
0
        /// <summary>
        /// Tries to resolve the name of the paragraph from
        /// a xml comment line by removing the prefix identifier and potential
        /// additional information.
        /// </summary>
        /// <param name="name">Header line of the xml comment based help paragraph</param>
        /// <returns>Name of the paragraph without prefix and additional information</returns>
        private static string GetNameFromLine(string name)
        {
            XmlHelperKeywordRegex keywordRegex = XmlHelpKeywordRegexBuilder.Create(HelpKeywordPrefixIdentifier);
            Match keywordRegexMatch            = keywordRegex.RegexObject.Match(name);

            return(keywordRegexMatch.Success ? keywordRegexMatch.Groups[keywordRegex.KeywordGroupName].Value : name);
        }
Example #2
0
        /// <summary>
        /// Tries to resolve the additional content from
        /// a xml comment based line by removing the prefix identifier and
        /// the name of the paragraph
        /// </summary>
        /// <param name="name">Header line of the xml comment based help paragraph</param>
        /// <returns>Additional information without prefix and header title</returns>
        private static string GetAdditionalInformationFromLine(string name)
        {
            XmlHelperKeywordRegex keywordRegex = XmlHelpKeywordRegexBuilder.Create(HelpKeywordPrefixIdentifier);
            Match keywordRegexMatch            = keywordRegex.RegexObject.Match(name);

            return(keywordRegexMatch.Groups[keywordRegex.AdditionalGroupName].Success ?
                   keywordRegexMatch.Groups[keywordRegex.AdditionalGroupName].Value : String.Empty);
        }