使用 MSDN 文档,是否可以隐藏或过滤继承的成员?

发布于 2024-11-05 15:13:09 字数 552 浏览 3 评论 0原文

我在帮助查看器中看到的最酷的功能之一是能够隐藏继承的成员,这样您就可以只关注特定子类提供的内容。一个很好的例子在这里...

http://james.newtonking .com/projects/json/help/html/T_Newtonsoft_Json_JsonConvert.htm

实际上,该页面有多种选项用于显示帮助,而不仅仅是隐藏继承的成员。

现在,在线 MSDN 有一个习惯,就是把所有东西都扔给你,这意味着试图找出子类添加了什么,更不用说需要大量扫描甚至更多滚动才能找到它。

也就是说,有什么方法(本地或在线)可以启用这些或类似的功能吗?有没有人制作过外部或第三方帮助查看器来执行此操作或类似操作?

(注:我不太确定这是否适用于 SO,因为它不是编程的东西,但它是一种与 IDE 相关的东西,所以我想我应该赌博并将其放在这里。

One of the coolest features I've seen in help viewers is the ability to hide inherited members so you can focus on only what that particular subclass offers. A good example of this is here...

http://james.newtonking.com/projects/json/help/html/T_Newtonsoft_Json_JsonConvert.htm

Actually, that page has various options for how to show the help, not just hiding inherited members.

Now online MSDN has a habit of just throwing everything under the sun at you meaning trying to figure out what a subclass has added, let alone getting to it requires tons of scanning and even more scrolling.

That said, is there any way, local or online, to enable those or similar features? Has anyone made an external or third-party help viewer that does this or something similar?

(Note: I'm not really sure if this is for SO since it's not a programming thing, but it is sort of an IDE-related thing so I figured I'd gamble and put it here.)

Mark

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

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

发布评论

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

评论(2

极度宠爱 2024-11-12 15:13:09

隐藏继承的项目是我过去在轻量级风格在线 MSDN 文档中错过的一件事。

幸运的是,通过在浏览器中使用一点 JavaScript 就可以轻松解决这个问题。请参阅如何在 MSDN 页面上隐藏继承的成员 了解详细信息。

您应该能够扩展所使用的原则来隐藏您需要的任何信息(例如,您可以使用图标来区分静态成员、方法、属性等...)。

Hiding inherited items is one thing I used to miss in the Lightweight style online MSDN docs.

Fortunately, it can be easily solved by using a litte bit of in browser javascript. See How to hide inherited members on MSDN pages for details.

You should be able to expand the used principle to hide any information you need (eg. you could use the icons to tell apart the static members, methods, properties and so on...).

缪败 2024-11-12 15:13:09

2016 年的更新答案:

在现代浏览器中使用以下 javascript 代码段作为 URL 创建书签:

javascript:var trs=document.getElementsByTagName('tr');var l=trs.length;for (var i=0; i<l; i++) {  var tr=trs[i];  if (tr.innerHTML.indexOf('(Inherited from ')>-1)  tr.style.display=tr.style.display=='none'?'':'none'; }; void(0);

在 MSDN 类文档页面上单击此书签将打开和关闭所有继承的成员。

javascript 只是查看页面上的所有表格行 ('tr'),查找包含字符串 '(Inherited from ') 的任何行,并将其显示样式(可见性)设置为 'none'。该搜索字符串似乎覆盖被继承的成员的每个实例。

Updated answer for 2016:

Create a bookmark in a modern browser with the following javascript snippet as the URL:

javascript:var trs=document.getElementsByTagName('tr');var l=trs.length;for (var i=0; i<l; i++) {  var tr=trs[i];  if (tr.innerHTML.indexOf('(Inherited from ')>-1)  tr.style.display=tr.style.display=='none'?'':'none'; }; void(0);

Clicking this bookmark while on an MSDN class documentation page will toggle all the inherited members on and off.

The javascript is just looking through all of the table rows ('tr') on the page, finding any which contain the string '(Inherited from ', and setting their display style (visibility) to 'none'. That search string seems to cover every instance of a member being inherited.

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