AutoDocumentation
Installation
To install AutoDocumentation, you can either browse the Package Manager or run the following command in the Package Manager Console :
PM> Install-Package BetaSoftware.AutoDocumentation
Usage
To start using AutoDocumentation, simply call the GenerateDocumentation method of the AutoDocumentation class with the project assembly :
var assembly = Assembly.LoadFrom(pathToDll); // Load the assembly.
BetaSoftware.AutoDocumentation.GenerateDocumentation(assembly);
To include all private and internal types in the generated documentation, call the GenerateDocumentation method with false as the second parameter :
var assembly = Assembly.LoadFrom(pathToDll); // Load the assembly.
BetaSoftware.AutoDocumentation.GenerateDocumentation(assembly, false);
Settings attributes
You can customize the content that will appear in your generated documentation with the AutoDocumentation attributes :
AutoDocumentationIgnore
Add to exclude a type from documentation generation :
[AutoDocumentationIgnore]
public class IgnoredClass {
...
}
Examples : Interface documentation
namespace DemoLibrary {
public interface IFormattable {
string FormatInformations();
}
}
DemoLibrary.IFormattable
public abstract String FormatInformations() Methods :
Examples : Class documentation
namespace DemoLibrary {
public class Employee : IFormattable {
public int Id;
public string Name;
public Address Address;
public Department Department;
public Employee(int pId, string pName,
Address address, Department department) {...}
public string FormatInformations() {...}
}
}
IFormattable
DemoLibrary.Employee :public Int32 Id Fields :
public String Name
public Address Address
public Department Department
public Employee(Int32 pId, String pName, Address pAddress, Department pDepartment) Constructors :
public String FormatInformations() Methods :
Examples : Struct documentation
namespace DemoLibrary {
public struct Address {
public int DoorNumber;
public string StreetName;
public string City;
public string PostalCode;
}
}
DemoLibrary.Address
public Int32 DoorNumber Fields :
public String StreetName
public String City
public String PostalCode
Examples : Enum documentation
namespace DemoLibrary {
public enum Department {
Sales,
Marketing,
HumanResources
}
}
DemoLibrary.Department
0 : Sales, Values :
1 : Marketing,
2 : HumanResources