Click here to Skip to main content
11,567,325 members (48,017 online)
Click here to Skip to main content

SandCastle documentation cleaner.

, 9 Sep 2006 15.3K 156 14
Rate this:
Please Sign up or sign in to vote.
Cleans the "extra" documented text out of your SandCastle built documentation.


Introduction

 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=\"FFrown | :( *)/> (cleans any internal members)
(\s*)<element api(.*)System.Web.UI(.*)/> (cleans MS doc stuff)
(\s*)<element api=(.*)(EXTRA_STUFF_HERE)(.*)/> (takes any extra)

Objective:
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.

Usage:
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:
cd "c:\project\bin\Debug"
MRefBuilder "C:\project\bin\Debug\project.dll" /out:reflection.org
PAUSE
....

Remove Field Example:
InternalProtectedMember|AnyOtherMember|AnotherMember_I_WantCleaned

License / Warranty:
License: Use it as you see fit, but please give credit to me (C. Bess).
Warranty: Be realistic... Its free for all.

Side Notes:
The CastleCleaner (when used as directed) makes the documentation a lot more "personal" and it actually speeds up the generation (of course).

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

C. Bess
Web Developer
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150624.2 | Last Updated 9 Sep 2006
Article Copyright 2006 by C. Bess
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid