提取的公共成员XML评论仅供网友仅供、成员、网友、XML

2023-09-03 15:42:23 作者:你若安好,那还得了

我使用XML注释记录公众以及我的组件进行内部和私有成员。我想,以使富(例如,使用方法,异常和参数说明)Visual Studio的智能感知与最终产品的包装与组件装配生成的文档的XML文件。它的问题是,C#编译器的一切(包括内部类,方法,内部枚举等私人领域)创建的文档条目,似乎没有切换到唯一的公共成员模式。

I'm using xml comments to document public as well as internal and private members of my components. I would like to package the generated documentation xml files with component assemblies in order to enable "rich" (e.g. with method, exceptions and parameter descriptions) Visual Studio Intellisense with the end product. The problem with it is that the C# compiler creates documentation entries for everything (including internal classes, methods, private fields of internal enums etc.) and there seems to be no switch to "only public members" mode.

现在我不想去,在每个XX方法了50个文件,并删除私人和内部成员的所有意见。即使我这样做,我可能不会有太大的成功,支持自动gen之类的资源文件,因为这些强类型的资源类自动注释和非公开的。

Now I don't want to go over 50 files with XX methods in each and remove all comments for private and internal members. Even if I did that, I probably would not have much success with auto-gen'd resource files, because these strongly-typed resource classes are automatically commented and non-public.

我的问题是:有没有一些选项/标志,我俯瞰?如果没有,是否有一些工具可以帮助独立公众成员从静止(前我开始code的)?

My question is: is there some option/flag that I'm overlooking? If no, are there some tools that could help separate public members from the rest (before I start to code one)?

推荐答案

沙堡帮助文件生成器有一个选项,以重新仅含有方法,属性,配置的接入方式的XML文件等...

SandCastle Help File Builder has an option to recreate the xml files containing only the configured access modes for methods, properties, etc...

唯一的缺点是,你必须生成一个文档。

The only "downside" is that you'll have to generate a documentation.

由于它已经是很久以前的我忘了,我增加了一个组件,以SHFB生成XML。

Since it's been a long time ago I forgot that I added a "component" to SHFB to generate the XML.

好消息是,这个组件包含在SHFB。

The good news is that this component is included in SHFB.

您必须将智能感知组件添加到SHFB项目。然后,它会根据配置的SHFB项目生成XML。

You have to add the "Intellisense Component" to the SHFB project. It will then generate the XML according to the configured SHFB project.

有关详细信息:智能感知组件在SHFB