Browse Source

Fix SD-1924 - Constructor XmlDoc fallback

pull/80/head
Daniel Grunwald 12 years ago
parent
commit
df16a5dd34
  1. 6
      src/Libraries/NRefactory/ICSharpCode.NRefactory.Xml/DocumentationElement.cs

6
src/Libraries/NRefactory/ICSharpCode.NRefactory.Xml/DocumentationElement.cs

@ -46,6 +46,12 @@ namespace ICSharpCode.NRefactory.Xml @@ -46,6 +46,12 @@ namespace ICSharpCode.NRefactory.Xml
IMember member = entity as IMember;
if (inheritDocIfMissing && member != null) {
if (member.SymbolKind == SymbolKind.Constructor) {
// For constructors, the documentation of the base class ctor
// isn't really suitable as constructors are not inherited.
// We'll use the type's documentation instead:
return Get(entity.DeclaringTypeDefinition, inheritDocIfMissing);
}
foreach (IMember baseMember in InheritanceHelper.GetBaseMembers(member, includeImplementedInterfaces: true)) {
documentationComment = baseMember.Documentation;
if (documentationComment != null)

Loading…
Cancel
Save