将XML注释移至单独的文件 [英] Moving XML comments to a separate file

查看:92
本文介绍了将XML注释移至单独的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢 XML注释.但是,在一切崩溃的情况下,每两行看起来像:

I love XML comments. However, with everything collapsed, every two lines looks like:

[/// summary ...]
public void CreateUser(string username, string password)[...]

将此乘以数十或数百种方法,结果折叠后的代码很难筛选. 我可以将这些注释移到单独的XML文件,并且让Visual Studio识别该关联,以便它们仍显示在Intellisense中吗?如果是这样,我该如何建立关联?而且我还使用SandCastle根据这些注释生成文档,因此关联也必须被SandCastle识别.

Multiply this by tens or hundreds of methods, and the resulting collapsed code is hard to sift through. Can I move these comments to a separate XML file, and still have Visual Studio recognize the association so that they still show up in the Intellisense? If so, how do I make that association? And I'm also using SandCastle to generate documentation based on these comments, so the association will have to be recognized by SandCastle as well.

推荐答案

您可以使用<include file='...' path='...'>标记引用外部注释.请参阅 http://msdn.microsoft.com/en-us/library/9h8dy30z.aspx

You can use the <include file='...' path='...'> tag to refer to external comments. See http://msdn.microsoft.com/en-us/library/9h8dy30z.aspx.

我不知道有什么工具可以将现有源文件中的注释移至外部注释文件.

I do not know of any tool that will move the comments in existing source file to an external comment file.

这篇关于将XML注释移至单独的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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