This project has moved. For the latest updates, please go here.

How to avoid documenting extension methods?

Topics: Developer Forum, User Forum
Mar 27, 2010 at 4:33 AM
Edited Mar 27, 2010 at 4:34 AM

First, thanks for the great software!  Really useful.  Currently I'm running a situation.  My library has some classes defining extension methods for System.Object.  The CHM generated not only lists these extension methods in the original declaring classes, which is fine and expected, but also in all other classes in the library, precisely because any .NET class inherits from System.Object.  Is there a way for me to get rid of these extension methods documentation?  I mean I only want them to appear in the original declaring classes, not in all other classes just because these classes inherit from System.Object.  Any suggestion is much appreciated.

Mar 27, 2010 at 7:17 PM

The only way to do that would be to track down where it's creating that section in the Sandcastle XSL transformations and comment it out so that it isn't included in the member lists.



Mar 28, 2010 at 4:27 AM

Thanks a lot.  That works.  To help others who might have the same issue, here is what I did:

- Browse to [Sandcastle_installation_folder]\Presentation\vs2005\transforms

- Open file utilities_reference.xsl

- Search for "extension method table"

- Comment out the immediately next xsl:if element

That should do, assuming you're using VS2005 style.