string GetParameterDoc(System.Reflection.PropertyInfo method, System.Reflection.ParameterInfo parameter)
        {
            if (method.DeclaringType == null)
            {
                return(null);
            }

            XmlNode methoddoc = GetIndexerDocFromType(method.DeclaringType, method);

            XmlNode paramdoc = methoddoc?.SelectSingleNode($"param[@name='{parameter.Name}']");

            return(ExtractSummary(paramdoc));
        }
        string GetIndexerDoc(System.Reflection.PropertyInfo indexer)
        {
            if (indexer.DeclaringType == null)
            {
                return(null);
            }

            XmlNode methoddoc   = GetIndexerDocFromType(indexer.DeclaringType, indexer);
            XmlNode remarksnode = methoddoc?.SelectSingleNode("remarks");

            if (remarksnode != null)
            {
                return(ExtractSummary(methoddoc.SelectSingleNode("summary")) + "\n" + ExtractSummary(remarksnode));
            }
            return(ExtractSummary(methoddoc?.SelectSingleNode("summary")));
        }
        string GetPropertyDoc(System.Reflection.PropertyInfo pi)
        {
            if (pi.DeclaringType == null)
            {
                return(null);
            }

            XmlDocument doc = GetAssemblyDoc(pi.DeclaringType.Assembly);

            XmlNode propertydoc = doc?.SelectSingleNode($"doc/members/member[@name='P:{pi.DeclaringType.FullName}.{pi.Name}']");
            XmlNode remarksnode = propertydoc?.SelectSingleNode("remarks");

            if (remarksnode != null)
            {
                return(ExtractSummary(propertydoc.SelectSingleNode("summary")) + "\n" + ExtractSummary(remarksnode));
            }
            return(ExtractSummary(propertydoc?.SelectSingleNode("summary")));
        }
        XmlNode GetIndexerDocFromType(Type type, System.Reflection.PropertyInfo method)
        {
            XmlDocument doc        = GetAssemblyDoc(type.Assembly);
            string      membername = $"{type.FullName}.{method.Name}({string.Join(",", method.GetIndexParameters().Select(p => p.ParameterType.FullName))})";

            XmlNode doctag = doc?.SelectSingleNode($"doc/members/member[@name='P:{membername}']");

            if (doctag == null)
            {
                return(null);
            }

            if (doctag.ChildNodes.Cast <XmlNode>().Any(c => c.Name == "inheritdoc"))
            {
                foreach (Type interfacetype in type.GetInterfaces())
                {
                    XmlNode summarydoc = GetIndexerDocFromType(interfacetype, method);
                    if (summarydoc != null)
                    {
                        return(summarydoc);
                    }
                }

                if (type.BaseType != null && type != typeof(object))
                {
                    XmlNode summarydoc = GetIndexerDocFromType(type.BaseType, method);
                    if (summarydoc != null)
                    {
                        return(summarydoc);
                    }
                }
                return(null);
            }

            return(doctag);
        }