从 XML 文档中隐藏类/方法 [英] Hiding Classes/Methods From XML Documentation

查看:21
本文介绍了从 XML 文档中隐藏类/方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用 XML-Doc 和 Sandcastle 记录程序集中的许多接口.但是,在构建文档文件时,我还想忽略一些接口.现在我设法通过使用标记为 internal 的那些接口编译程序集来做到这一点,但这更像是一种解决方法而不是问题的解决方案,因为实际上,那些需要 public.是否有某种属性可以装饰不需要的属性,以便它们被忽略?

I have a number of interfaces in an assembly which I need to document using XML-Doc and Sandcastle. However, there are also a few interfaces I would like to ignore when building the documentation file. Right now I manage to do it by compiling the assembly with those interfaces marked as internal, but this is more a workaround than a solution to the problem since, in fact, those need to be public. Is there some kind of attribute one can decoracte unwanted ones with so that they are ignored?

推荐答案

我认为从 IntelliSense 中隐藏特定类型/成员的唯一方法是设置它们的访问修饰符,就像您目前提到的那样.

I think the only way to hide specific types/members from IntelliSense is to set their access modifier as you mention you currently do.

就 Sandcastle 而言,您可以使用类似于 这篇 MSDN 博文.

As far as doing this with Sandcastle, you can use API filters similar to what is discussed in this MSDN blog post.

这篇关于从 XML 文档中隐藏类/方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆