Skip to content

darkthread/DocsByReflection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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:

Change Log

  • 1.0.9: Sign the assembly.
  • 1.0.8
    • Added fallback to try get documentation from methods with typed parameters on base class.
    • Some internal refactorings.
  • 1.0.0 Initial version.

About

Discover the code documentation at runtime by reflection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 83.3%
  • HTML 16.7%