RicoSuter / Namotion.Reflection

.NET library with advanced reflection APIs.
MIT License
212 stars 44 forks source link

GetXmlDocsSummary not working for interfaces #130

Closed Malivil closed 1 year ago

Malivil commented 1 year ago

Properties with summaries defined in interfaces do not have their values retrieved when calling GetXmlDocsSummary, either on the base class or on the interface directly.

public interface IConfigInfo
{
    /// <summary>
    /// Test Path
    /// </summary>
    string Path { get; set; }
}
public class ConfigInfo : IConfigInfo
{
    /// <inheritdoc />
    public string Path { get; set; }
}
typeof(IConfigInfo).GetMember("Path").First().GetXmlDocsSummary(); // ""
typeof(ConfigInfo).GetMember("Path").First().GetXmlDocsSummary(); // ""
Malivil commented 1 year ago

Nevermind. I forgot to enable the XML docs generation for that project.