
cr-documentor - issue #20
Enumeration summaries don't appear in member table when members have attributes
Create a sample enum, like:
using System; using System.Runtime.Serialization;
namespace TestNamespace { /// <summary> /// Test enumeration. /// </summary> public enum TestEnum { /// <summary> /// First member. /// </summary> MemberOne,
/// <summary>
/// Second member.
/// </summary>
[EnumMember]
MemberTwo
}
Look at the class doc for the enumeration. In the table that lists the members, the member without the attribute ("MemberOne") will have its description correctly listed; the member with the attribute ("MemberTwo") will not.
Both should have a proper description.
Comment #1
Posted on Jan 21, 2010 by Helpful Wombat(No comment was entered for this change.)
Comment #2
Posted on Jan 21, 2010 by Helpful Wombat(No comment was entered for this change.)
Comment #3
Posted on Jan 21, 2010 by Helpful WombatFixed the TransformEngine base/abstract class "RenderElementSummary" method. Previously it would get the element node that was documented (the enum member), then grab the previous node (usually the XML doc, but sometimes an attribute) and try to render that. The new implementation determines if the element node (the enum member) even has documentation and, if so, walks backwards up the parse tree until it finds it or can't walk backwards anymore.
Comment #4
Posted on Jan 21, 2010 by Helpful WombatJust found an issue with the way I fixed it - now enum members that don't have any documentation get the documentation of the previous enum member.
Comment #5
Posted on Jan 21, 2010 by Helpful WombatOK, fixed "for reals" this time. Converting member elements to CodeElement. If it can't be documented (!CodeElement.CanBeDocumented) or isn't a code element, we don't render summary info. If it can be documented, we get the CodeElement.DocComment for the element. If it exists, render. If not, skip it.
Status: Fixed
Labels:
Type-Defect
Priority-High