如何在 C# XML 注释中链接/分组重载?
在C#的XML文档注释中,是否有一种方法可以将两个或多个函数标记为彼此重载,以便它们自动相互引用? 理想情况下,它们也会以某种方式分组在沙堡生成的文档中。
目的:通常,我想链接到这组函数,例如在实用函数列表中,只需提及其中一个重载,并从那里轻松发现其他重载。
目前我正在添加链接,但这很乏味。
In XML documentaiton comments for C#, is there a way to mark two or more functions to be overloads of each other, so that they reference each other automatically? Ideally, they'd also be grouped in the sandcastle-generated documentation somehow.
Purpose: Often, I want to link to this group of functions, e.g. in a list of utility functions, just mention one of the overloads, and make the others easily discoverable from there.
Currently I am adding links, but that's tedious.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
XMl 文档和 Sandcastle 已识别并分组了多个重载之间的关系。
使用
see
或seealso
标签创建指向其他成员的链接。例如。
我发现 Sandcastle 成员解析可能有点不稳定,所以我倾向于使用完全限定名称。
请注意,M: 表示正在引用成员,您还可以使用 E: 来指向事件。 T:用于类型,但如果不存在则假定为类型。
The relationship between multiple overloads are already identified and grouped by XMl documentation and Sandcastle.
Creating links to other members using the
see
orseealso
tags.Eg.
I've found though that Sandcastle member resolution can be a bit flaky so I tend to use fully qualified names.
Note the M: indicates a member is being referenced, you also use E: to point to an Event. T: is used for type but that is assumed if not present.
分组是由 Sandcastle 自动完成的,对吧,但是如果您想给重载组一个通用的描述,请使用对此的标记(与
它不是标准的 XML 文档标签,但 AFAIR Sandcastle 帮助文件生成器支持它。
Grouping is done automatically by Sandcastle, right, but if you want to give overload group a common description, use <overloads> tag for this (in the same way as <summary>).
It is not a standard XML documentation tag but AFAIR it is supported by Sandcastle Help File Builder.