Namespace documentation on a .Net project (Sandcastle)?

后端 未结 7 504
萌比男神i
萌比男神i 2020-12-23 09:12

I started using Sandcastle some time ago to generate a Documentation Website for one of our projects. It\'s working quite well but we\'ve always only written documentation f

7条回答
  •  [愿得一人]
    2020-12-23 09:36

    Sandcastle also supports the ndoc-style namespace documentation, which allows you to stick the documentation in the source files:

    Simply create a non-public class called NamespaceDoc in the namespace you want to document, and the xml doc comment for that class will be used for the namespace.

    Adorn it with a [CompilerGenerated] attribute to prevent the class itself from showing up in the documentation.

    Example:

    namespace Some.Test
    {
        /// 
        /// The  namespace contains classes for ....
        /// 
    
        [System.Runtime.CompilerServices.CompilerGenerated]
        class NamespaceDoc
        {
        }
    }
    

    The work item in SandCastle is located here.

提交回复
热议问题