<include> with a #region from sample code?

Mar 4, 2008 at 7:22 AM
Hey,

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,
Keith
Editor
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.

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

Eric,

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.

Keith