Pankaj
Pankaj

Reputation: 2754

Add Line in Sandcastle generated example code

I want to add a line in Sandcastle generated example code This is what i have written so far

/// <summary>
/// Represents the SQL Connection for interaction with the Database
/// </summary>
/// <example> Add these lines in the Web.config or App.config File. 
/// Value here should be the Active Database Context
/// <code>
/// <appSettings>
/// <add key= "DBName" value="ActiveDBContext"/>
/// </appSettings>
/// </code>
/// </example>
public class DataConnection : IDisposable
{
   // rest of the class here
}

but in the sandcastle generated documentation file, it displays like this

<appSettings><add key="DBName" value="ActiveDBContext" /></appSettings>

where as I want it to get displayed like this

<appSettings>
   <add key= "DBName" value="AssetCaptureDB"/>
</appSettings>

I guess it is because of the < & > characters, How can I add a line break to the documentation file where these characters are there.

Upvotes: 1

Views: 140

Answers (1)

Peter Macej
Peter Macej

Reputation: 5607

Try:

/// <code><![CDATA[<appSettings>
///    <add key= "DBName" value="AssetCaptureDB"/>
/// </appSettings>]]></code>

I didn't try it with Sandcastle, but with VSdocman (which is our product) it worked fine. The comment was generated with VSdocman's comment editor.

Upvotes: 1

Related Questions