It all started when I found out that the documentation generated by SandCastle was showing internal code (those members marked as 'internal' and 'internal protected'). Of course this was unwanted. So with my magic regular expression wand and an observant eye, I created some regex that would "clean" the comments. Then I went a step further and had it clean the MS stuff out also.
I present to you the culminated version.
These are just the regular expressions used to match the xml that contains the unwanted code (multi-line mode should be used):
(\s*)<element api=\"F *)/> (cleans any internal members)
(\s*)<element api(.*)System.Web.UI(.*)/> (cleans MS doc stuff)
(\s*)<element api=(.*)(EXTRA_STUFF_HERE)(.*)/> (takes any extra)
The CastleCleaner is designed to parse and remove all traces of members marked as internal
, comments from the System.Web.UI
namespace, and extra stuff you type into the "Remove" field.
The remove field uses the pipe ( | ) delimited case-sensitive text to "clean" any other code with that member name.
FYI: The output is written to the input file.
The only way that I have implemented the CastleCleaner has been via a 'PAUSE' after the MRefBuilder generates its output file. During the pause I find the generated MRegBuilder file and drop it into the CastleCleaner window. And in about two seconds (depending on the input) it rewrites the freshly baked and cleaned file.
So that is what I recommend you do.
Batch File Example:
MRefBuilder "C:\project\bin\Debug\project.dll" /out:reflection.org
Remove Field Example:
License / Warranty:
License: Use it as you see fit, but please give credit to me (C. Bess).
Warranty: Be realistic... Its free for all.
The CastleCleaner (when used as directed) makes the documentation a lot more "personal" and it actually speeds up the generation (of course).