private static string GetXmlDocumentation(this MemberInfo member, XDocument xml)
        {
            var name          = GetMemberElementName(member);
            var documentation = FullDotNetMethods.XPathEvaluate(xml, string.Format("string(/doc/members/member[@name='{0}']/summary)", name)).ToString().Trim();

            return(RemoveLineBreakWhiteSpaces(documentation));
        }
Beispiel #2
0
        private static string GetXmlDocumentation(this ParameterInfo parameter, XDocument xml)
        {
            var name = GetMemberElementName(parameter.Member);

            if (parameter.IsRetval || string.IsNullOrEmpty(parameter.Name))
            {
                return(FullDotNetMethods.XPathEvaluate(xml, string.Format("string(/doc/members/member[@name='{0}']/returns)", name)).ToString().Trim());
            }
            else
            {
                return(FullDotNetMethods.XPathEvaluate(xml, string.Format("string(/doc/members/member[@name='{0}']/param[@name='{1}'])", name, parameter.Name)).ToString().Trim());
            }
        }