Skip to content

Paodange/DocsByReflection

 
 

Repository files navigation

DocsByReflection

Build status

Discover the code documentation at runtime by reflection.

Original source code from Jim Blackler' DocsByReflection: http://jimblackler.net/blog/?p=49

Setup

NuGet

PM> Install-Package DocsByReflection

Using

// From type.
var typeDoc = DocsService.GetXmlFromType(typeof(Stub));

// From property.
var propertyInfo = typeof(Stub).GetProperty("PropertyWithDoc");
var propertyDoc = DocsService.GetXmlFromMember(propertyInfo);

// From method.
var methodInfo = typeof(Stub).GetMethod("MethodWithGenericParameter");
var methodDoc = DocsService.GetXmlFromMember(methodInfo);

// From assembly.
var assemblyDoc = DocsService.GetXmlFromAssembly(typeof(Stub).Assembly);

ThrowError parameter

All of the above methods have a last parameter called throwError. The default parameter's value is true, when value is true any documentation not found will throw an error, when value is false the method will return a null value.

License

DocsByReflection is release using a dual-license. You can choose the one that best fit your needs:

About

Discover the code documentation at runtime by reflection.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%