Filter out all constructors\Include only documented items

Topics: User Forum
Jun 24, 2008 at 6:51 AM
I'm currently documenting a proxy for a web service. The proxy was auto-generated so all classes in it do not have any constructors and there's no need to document them. Is there a way to exclude all constructors?
Another thing I was thinking about is whether there's an option to only include items which have xml documentation?
Jun 24, 2008 at 3:11 PM
You can use the ApiFilter property to get rid of members that you do not want documented.  There currently isn't a way to remove members without documentation.

Jun 24, 2008 at 4:53 PM
I'm aware of the ApiFilter property but the problem is I have tons of classes and more are coming and i don't want to maintain that. I just want all constructors to be removed. Is it possible using regular expression, custom modules, whatever?
Jun 24, 2008 at 7:33 PM
You could write a plug-in for SHFB that runs after the GenerateReflectionInfo step that loads the file and strips out the constructors.  Likewise, you could probably develop a plug-in that matches members in the reflection file with members in the XML comments files and strips out anything without comments.  See the SHFB help file for details on developing a plug-in (Build Process Plug-Ins | Creating Build Process Plug-Ins).

Jun 26, 2008 at 3:01 PM
I successfully created a plugin that does that. The plugin is configurable and can be passed a simple list of XPath expressions. Each expression is run against the file and all elements that match the expression are removed.
If you'd like to integrate this with the distribution of Sandcastle, drop me a note and I'll email you the sources.
Jun 26, 2008 at 7:28 PM

Sure, I'll take a look at it.  My e-mail address is in the About box and in the footer of the pages in the help file.