NDoc, the best and free documentation compiler for C# has lately released v1.3. This version adds a very interresting new feature: custom tags.Basically, you just need to provide the XSLT templates to NDoc and it use them to render you tags: simple, efficient and highly customizable.
In the NCollection project, we needed a way to easily document the complexity of methods (average and worst). A custom tag was the perfect solution for that: (hint: I'm using brackts intead of minus/greater)
/// [complexity worst="n" average="1" /]public void Method(){...}
Starting from the NDoc example, the XSLT stylesheet to render this tag is:
[xsl:template mode="remarks-section" match="complexity"> [H4 class=dtH4>Complexity[/H4] [UL] [LI]Average: O([xsl:value-of select="@average"][/xsl:value-of]) [LI]Worst-case: O([xsl:value-of select="@worst"])[/LI] [/UL] [xsl:apply-templates select="*"/] [/xsl:template]
Et voilà!
Page rendered at Friday, August 29, 2008 12:15:56 AM UTC
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.