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
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);
You can customize the content that will appear in your generated documentation with the AutoDocumentation attributes :
Add to exclude a type from documentation generation :
[AutoDocumentationIgnore]
public class IgnoredClass {
...
}
namespace DemoLibrary {
public interface IFormattable {
string FormatInformations();
}
}
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() {...}
}
}
DemoLibrary.Employee : IFormattable
public String Name
public Address Address
public Department Department
public Employee(Int32 pId, String pName, Address pAddress, Department pDepartment)
public String FormatInformations()
namespace DemoLibrary {
public struct Address {
public int DoorNumber;
public string StreetName;
public string City;
public string PostalCode;
}
}
public String StreetName
public String City
public String PostalCode
namespace DemoLibrary {
public enum Department {
Sales,
Marketing,
HumanResources
}
}
1 : Marketing,
2 : HumanResources