<include> with a #region from sample code?

Mar 4, 2008 at 7:22 AM

I seem to remember reading somewhere that I could use an <include> statement in my C# XML doc comments to pull in a #region from live (sample) code. I want to have my sample code in the build / test tree and then <include> appropriate code #regions for the XML classes / methods comments.

Did I imagine this, or is there a way to specify a code region rather than an use XPath with the <include> tag?

Thanks in advance,
Mar 4, 2008 at 7:37 AM
Edited Mar 4, 2008 at 7:38 AM
That's a feature of the Code Block Component available at http://www.codeplex.com/SHFB. It's already integrated into SHFB and is used by default. If you are using something else, you can download the Standalone Build Components. See the SHFB help file or the included docs for info on how to use the new attributes on the <code> tag.

Mar 4, 2008 at 9:48 PM
Edited Mar 4, 2008 at 9:49 PM


Thanks - I'm looking over the CodeBlockComponent now. Hopefully I can figure out how to implement it. Frankly, I'm more from the writing side of the street, and Sandcastle is more challenging than some systems I've used.

However, SHFB is great! I'd really be up a creek without it. Thanks for the excellent work.