### Implementing A Custom Documenter

Implementing a documenter requires an assembly with at least two classes:

- A class that inherits from NDoc.Core.DocumenterBase

- And a class that inherits from NDoc.Core.DocumenterConfigBase

DocumenterConfigBase includes the settings that are shared by all documenters. These settings govern how the /doc XML is merged with reflected meta-data. The inherited class can add its own properties that govern its operation.

DocumenterBase defines the general process for creating the documentation. This base class will do the XML merge and it is then up to the derived class to transform the merged XML into a documentation set.

The implementation must provide implementations for the abstract base class methods of Clear, Build, and the MainOutputFile property.

In the implementation of Build, call the base class MergeXML method. This method merges the /doc XML file with the project assembly's reflected meta-data and returns the resulting XML to the derived class. It is then up to the derived class to transform the XML into it particular documentation format.

Using the XML Documenter in order to pre-generate the merged XML, in conjunction with the UseNDocXmlFile setting, is a good way to explore the structure of the merged XML document and concentrate on creating the custom documentation format.

### How Documenters Are Loaded

NDoc uses a naming convention for the assemblies that contain documenters. To be located by NDoc, a documenter's assembly must be named with the pattern:

NDoc.Documenter.<NAME>.dll

where <NAME> is the documenter's name.

Each documenter must reside in the same folder as the NDocGui.exe and NDocConsole.exe applications in order to be located correctly.