cecil
cecil copied to clipboard
Add support for generating the method and generic method comment signature with nested types
Hi @jbevain, current when a method or generic method with a nested type argument and that is defined in a generic class, the DocCommentId can't generate the comment signature of the method correctly. I created a few test methods with some special arguments for generate test XML documentation and make the DocCommentId can generate the same comment signature.
I don't have the specifications document of XML documentation that I now just found a basic introduction in Microsoft Docs but the introduction hasn't described the rules of the generic method. Although the comment signature of the generic method looks like has been fixed and maybe it's not a standard implementation. If you have the specifications document could you share them with me?
Hey @hiihellox10, thanks for the PR! Hey @joelmartinez, I know you depend on this, could you review?
Oh, also ... just for the sake of referencing, this is a fix to #606
If you have the specifications document could you share them with me?
The spec Roslyn uses can be found here, and the implementation is here and here.
Note that different compilers (e.g. Roslyn vs MSVC) and doc processing tools (e.g. whatever MS uses for the docs that ship with the framework) can differ in their documentation ID syntax, so there may be more than one "correct" ID for a given type/member. ex: https://github.com/dotnet/roslyn/issues/52599
@saucecontrol "whatever ms uses for the docs" is mdoc (which uses cecil's implementation). This is the reason that @hiihellox10 and I are working on this issue 🤣
Thanks for that link though, that was helpful. I think that reading through it (albeit briefly) the changes here seem to match the specs.
Well that is fascinating. I happened to find this PR while looking up the source for GenericInstanceType
to make sure I was navigating it correctly while re-working my own doc tool to allow for multiple doc ID syntaxes to account for these differences. Small world. 🤣
Hi @jbevain @joelmartinez, could you please help review this PR? Also, the CI is awaiting an approval.