使用 Sandcastle 进行记录:使用引用枚举值

发布于 2024-08-31 15:42:36 字数 910 浏览 3 评论 0原文

我正在使用 Sandcastle 2.4.10520 和 Sandcastle Help File Builder 1.8.0 生成 .chm 帮助文件。

在我的文档中,我使用 标签。

如果我尝试引用像 这样的枚举,它会完美地工作。

如果我尝试引用像 这样的枚举值,我会在文档文件中获得一个链接,但该链接会将我引导至 未找到 MSDN 页面

我没有收到任何警告 - 我的 xml 文档是正确的。

我注意到引用枚举值的 MSDN 页面也有一个“找不到页面”链接。 例如: UInt64.Parse 方法(字符串、NumberStyles , IFormatProvider) 引用 NumberStyles.AllowHexSpecifier ,这会导致另一个 找不到 MSDN 页面

我应该引用枚举而不是枚举值吗?

我应该怎么做才能引用枚举?有可能吗?

I'm using Sandcastle 2.4.10520 and Sandcastle Help File Builder 1.8.0 to generate a .chm help file.

In my documentation, I'm using <see> tags.

If I try to refer an enum like <see cref="NumberStyles"/> it works perfectly.

If I try to refer an enum value like <see cref="NumberStyles.AllowTrailingWhite"/> I get a link in the documentation file, but the link leads me to an MSDN Page not found

I don't get any warnings - my xml documentation is correct.

I've noticed that MSDN pages that refer to an enum value also have a Page not found link.
For example: UInt64.Parse Method (String, NumberStyles, IFormatProvider) refers to NumberStyles.AllowHexSpecifier and this leads to another MSDN Page not found.

Should I refer to the enum instead of the enum value?

What should I do to refer an enum? Is it even possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

兔小萌 2024-09-07 15:42:36

MSDN 上发生的事实并不是一个好兆头。枚举值有 XML 文档吗?

如果我没记错的话,SHFB 中应该有一些设置可以让您强制为没有 XML 的成员生成文档 - 或者也许这是一个可以让您排除没有 XML 文档的成员的设置。无论如何,请仔细检查一下设置,以确保您不会以这种方式排除枚举成员。

否则,它应该为每个成员生成文档,并且枚举值是与 const 或静态字段相同类型的成员。

编辑: 看起来至少在较新的 MSDN 站点上,单个枚举值没有给出自己的页面。例如,查看 NumberStyles 枚举。在这种情况下,除了链接到枚举之外,您可能没有更好的选择。

The fact that it's happening on MSDN doesn't bode well. Do the enum values have XML documentation?

If I remember correctly, there should be settings in SHFB that will let you force generation of documentation for members that don't have XML - or maybe it's a setting that lets you exclude members that don't have XML doc. Regardless, give the settings a good once over to make sure you aren't excluding the enum members that way.

Otherwise, it should generate documentation for every member, and enum values are members of types the same as a const or static field would be.

EDIT: It looks like at least on the newer MSDN site, individual enum values aren't given their own page. For example, take a look at the NumberStyles enum. In that case, you might not have a better option than just linking to the enum.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文