C # Documentation - Custom Tags

I want to document the source code (C # sources) and I use XML documentation tags. How can I identify by specific tags?

For example, I use many Design by Contract offers. I would like to have sections of documentation for assumptions, postconditions, invariants ... It should be possible to write documentation such as:

/// <precond>arg != null</precond>
/// <postcond>return > 0</postcond>

Since I'm not an XML guru, can any of you (gurus) advise me?

I tried using <include>, but it is impossible (for me) to have the correct documentation.

Many thanks

+3
source share
2 answers

NDoc . NDoc , ​​ .

Sandcastle , , Sandcastle Builder, .

XSL , .

<xsl:template match="myTag" mode="seealso-section">
    <h1 class="green">
         <xsl:value-of select="." mode="slashdoc"/>
    </h1>
    </xsl:template>     
    <xsl:template match="null" mode="slashdoc">
    <xsl:text> null reference (Nothing in Visual Basic) </xsl:text>
</xsl:template>

XML (csc.exe /doc), , , , , .

+2

, xml.

, , , . , .

+5

Source: https://habr.com/ru/post/1716295/


All Articles