Each IAssembly is able to provide documentation for the types and members that it contains. This documentation generally originates from XML documentation comments.
Assembly Documentation
The IAssembly.Documentation property provides access to the assembly's documentation. It returns an object of type IAssembly
The IDocumentation
Project Assembly Documentation
Project assemblies, or types implementing IProject
Binary Assembly Documentation
Binary assemblies, or types implementing IBinarynull
, then no documentation was able to be automatically loaded for the assembly.
Probing Logic
When probing for XML files, it will first examine the folder that contained the DLL file, if that is known. Within this folder, it will search for a localization child folder named by the current culture. If a file is not found there, it will look in the folder that contains the DLL. If a file is not found there, it will start searching through various known .NET "Reference Assemblies" folders for the file.
Manually Loading Binary Assembly Documentation
For scenarios where the automatic probing for XML documentation comment files was unsuccessful (generally because of security restrictions or the files simply not being in a known location), but you know where the XML file is located, it is possible to manually create a File
As long as security permits access to the path, the documentation will be loaded properly as needed.
Custom Assembly Documentation
Custom IAssembly
For instance, a class inheriting StreamStream
to the XML file, and the base class will do the rest.