コード例 #1
0
        /// <summary>
        /// Parses and constructs a <see cref="DocumentationComment" /> from the given fragment of XML.
        /// </summary>
        /// <param name="xml">The fragment of XML to parse.</param>
        /// <returns>A DocumentationComment instance.</returns>
        public static DocumentationComment FromXmlFragment(string xml)
        {
            var result = s_cacheLastXmlFragmentParse;

            if (result == null || result.FullXmlFragment != xml)
            {
                // Cache miss
                result = CommentBuilder.Parse(xml);
                s_cacheLastXmlFragmentParse = result;
            }

            return(result);
        }
コード例 #2
0
 /// <summary>
 /// Parses and constructs a <see cref="DocumentationComment" /> from the given fragment of XML.
 /// </summary>
 /// <param name="xml">The fragment of XML to parse.</param>
 /// <returns>A DocumentationComment instance.</returns>
 public static DocumentationComment FromXmlFragment(string xml)
 {
     return(CommentBuilder.Parse(xml));
 }