Closed Doraku closed 4 years ago
The parameter names would be simple enough, check if the number of parameter types is the same as the number of param descriptions and fuse them but they would need to be in the correct order (as they should be anyway). Getting the ref/out/in information would be a little harder. Currently only the xml documentation file is used and it doesn't contains that (nor the return types of methods). This is probably because it doesn't change the method signature so the intellisense does not need it to display the correct documentation. I have thought about using the produced dll/exe as an extra input to get those missing pieces by reflection but I haven't had the time to look into it yet :/
Hi Doraku,
If it can help, here are some files I use to read XML documentation at runtime in an another project.
It supports merging the XML document with MemberInfos from the assembly.
https://gist.github.com/lazlo-bonin/ef1beda13e3ffb7384e023766250ba43
The relevant method is for parameter matching is called CompleteWithMethodBase
.
After giving a try with some good old reflection like in your gist, there was one problem: you could only load assembly from the same framework and a version inferior or equal. This limitation seemed huge (and detecting weither to be launched with netcore, netframework, x86 or 64bits depending of the assembly generated seemed like a nightmare) but then it came to me as I was using ILSpy at work... I felt so stupid, I will just switch to Mono.Cecil, this way I can get all the missing informations to generate a complete documentation whatever the framework/version.
aaaaaand done DefaultDocumentation 0.5.0 After much trial I think the produced documentation is almost perfect (for the simple layout of the markdown language at least), I tried to stick as close as possible to the microsoft dotnet api documentation style.
Amazing, thanks! I didn't expect that much of an upgrade. I have a few other much more minor issues after the upgrade, I'll post them separately.
That would be great. Currently it's very ambiguous.
Also,
ref
andout
indications would be great.