I have mentioned before that I work on Monorail documentation. Mostly I'm doing this in my spare time. I want to make sure I have correct and valid documentation. I can use reflection to call all methods (with some predefined parameters). My code parses their output and generates some (format and small example. After this I still need to add explanations manually) of the documentation automatically. I got it done and now I want to release this small project. You can get it here (VS2003 C# project).
The program can be used to make it convenient to see how to use different helpers (certain Monoral components) as it generates example input and output, especially if there're no docs available for the helper yet. You can also use this if you are developing or modifying some helper and want to see that it works as you expect it to work.
HelperDocumentingComponent is used to generate documentation. It uses reflection to call all of the methods declared in the current helper only (No overridden methods are called). Output from each method is then converted to string (ToString) and shown on the webpage. CreateParam method generates a parameter for a method from a template picked by the parameter type.
Generated docs follow this format:
/// Docs in XML format to be inserted to the code
/// ...
/// ...
Example output as it would be added to the page
It is possible to specify which helper to document. Homepage (default.aspx) is using it to create links to all existing helpers. To show docs for a specific helper navigate to "~/helperdocs/generatehelperdocs.ashx?helperName=helpername". By default the program tries to find the helper in the Monorail assembly, but you can easily modify the source to look for it in a different assembly (or several others for that matter).
If a method to be documented returns some object of a class the name of the class is shown instead of the object's value. In the future I might add code to show all of the object's properties.
I am using several tools with this project. nAnt to run build files and Cassini to show example website without having to add it to IIS. I don't use nAnt to compile the solution, only to generate distribution. Building from VS.NET is easier for me. If you want to use nAnt to compile just launch "go.cmd". I believe it should work fine.
To launch the server start "runServer.cmd". When Cassini dialog opens click on the link.
I have not included nAnt to keep release archive file size small. If you choose to get it place it in "nAnt" folder in the "tools" directory. You can find nAnt here. Full Cassini distribution can be found here.