Search code examples
c#documentationsandcastle

C# documentation – possible to add parent nodes inside namespace?


I am documenting a C# project that is built of a single namespace that contains 8 interfaces, classes and enums.

I am using the last version of sandcastle (July 2015). Since all interfaces, class and enums are under the same namespace, with sandcastle result I get all under the same API content parent node, which isn't what I want. Instead I would like to have all interfaces under one parent, all classes under another parent node and all enums under another. In addition (if possible) I would like to have for each API parent node a conceptual sibling node, to describe concept.

Is it possible? If not, can you suggest other solutions? Notice I can't add namespaces.

With sandcastle - will it be possible by using a few content layouts, one for each interface? (not sure it is possible to use more than 1 content layout for a namespace).

Thanks


Solution

  • I found a solution to this problem, and decided to share, just in case it can be useful to anyone.

    Sandcastle doesn't support breaking API documentation to a few nodes. So the workaround I found is to use HTML Workshop Manager to rearrange the HTMLs as required. Just create a project in HTML Workshop manager, and set it to use the HTMLs generated by Sandcastle. Notice Sandcastle HTML files names are numbers only, so it is required to rename it according to html content somehow.

    HTML Workshop Manager has command line interface, so entire process of creating CHM from Sandcastle's htmls can be automated. For this you need to create in advance a project in HTML Workshop manager, and write a code to update its table of content (.hhc file) and index file (.hhk) so they use Sandcastle's HTMLs. I recommand using HTML Agility pack for this, since .hhc and .hhk files are htmls.

    Comments will be appretiated.