NDoc 增强中的方法的 .Net 反射问题
我已经使用 NDoc 有一段时间了,现在使用 NDoc 增强版(http://sourceforge.net/projects/ndoc-e/),但我遇到了一个奇怪的问题,其参数本身采用通用参数的方法。
例如,任何具有字典作为参数的东西,其中字典的类型参数不是基类类型,都将无法正确找到文档,因为当代码使用 Type.FullName 来获取类型时,它会得到一个非常长的字符串,如下所示
System.Collections.Generic.Dictionary`2[[VDS.RDF.INode, dotNetRDF, Version=0.2.0.26419, Culture=neutral, PublicKeyToken=82b4e01e1f8f2469],[VDS.RDF.INode, dotNetRDF, Version=0.2.0.26419, Culture=neutral, PublicKeyToken=82b4e01e1f8f2469]]
:假设一定有办法解决这个问题,但我不知道是什么。真正奇怪的是,具有上述全名的类型将报告自己不是 GenericType 或具有 GenericTypeParameters,这对我来说似乎完全错误。有谁知道这个问题是什么以及相应的解决方法?
我可以改用 NDoc3,它没有这个问题,但该项目没有发布它的源代码,所以我无法自己查找。
有人可以满足我的好奇心并启发我吗?
I've used NDoc for quite a while now using a customised build (i.e. slightly bug-fixed build) of NDoc Enhanced (http://sourceforge.net/projects/ndoc-e/) but I've run into a strange issue with methods that have parameters which themselves take generic parameters.
For example anything that has a Dictionary as a parameter where the type parameters for the dictionary are not base class types will not find documentation properly as when the code uses Type.FullName to get the type it gets a really long string like the following:
System.Collections.Generic.Dictionary`2[[VDS.RDF.INode, dotNetRDF, Version=0.2.0.26419, Culture=neutral, PublicKeyToken=82b4e01e1f8f2469],[VDS.RDF.INode, dotNetRDF, Version=0.2.0.26419, Culture=neutral, PublicKeyToken=82b4e01e1f8f2469]]
I assume there must be some way around this but I can't figure out what. The really strange thing is that the Type with the above fullname will report itself as not being a GenericType or having GenericTypeParameters which seems completely wrong to me. Does anyone know what the issue and corresponding workaround for this is?
I can switch to using NDoc3 instead which doesn't have this issue but that project doesn't publish it's source code so I can't look it up myself.
Can someone satisfy my curiosity and enlighten me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论