[英]Customize C# Standard Document Generators (XML Comments) in Visual Studio
///
Generates function()
Code) or any tool item (like signature in email @ outlook) in VS IDE, For following MS Standard Coding & Documentation & making understand to other co-developer working on same project. 在VS IDE中是否有任何其他类型的C#文档生成器快捷方式(如///
生成function()
代码)或任何工具项(如email @ outlook中的签名),用于以下MS标准编码和文档以及了解其他负责同一项目的共同开发人员。 Ex: 例如:
1. **Default Format**
// Name:
// Author:
// Description: <summary></summary>
// Parameters: <param name="abc"></praram>
// Returned Value: <returns></returns>
2. **New Custom Format**
// Application: <project></project> <version></version>
// Created Developer: <developer></developer>
// Created Date: <date></date>
// Last Modified:
// Last Modified Developer:
// Parameters: <param name="abc"></praram>
// Return Type: <returns></returns>
// Description: <summary></summary>
Not sure if you mean instead of the /// comments but there are lots of options from this question here: 不确定你的意思是代替///评论,但这个问题有很多选项:
https://stackoverflow.com/questions/641364/c-sharp-documentation-generator https://stackoverflow.com/questions/641364/c-sharp-documentation-generator
There is also these articles here: 这里还有这些文章:
http://msdn.microsoft.com/en-us/magazine/dd722812.aspx#id0400027 http://msdn.microsoft.com/en-us/magazine/dd722812.aspx#id0400027
http://blogs.msdn.com/b/lisa/archive/2010/05/25/how-to-customize-the-xml-comments-that-are-inserted-by-the-visual-basic-code-editor.aspx http://blogs.msdn.com/b/lisa/archive/2010/05/25/how-to-customize-the-xml-comments-that-are-inserted-by-the-visual-basic-code- editor.aspx
One of the tools that let you customize the default XML comment is our VSdocman . 我们的VSdocman是允许您自定义默认XML注释的工具之一 。 You can pre-define the comment for each code element type (method, property, ...) and even for particular name or type. 您可以为每个代码元素类型(方法,属性,...)预定义注释,甚至可以为特定名称或类型定义注释。 It's called comment templates . 它被称为评论模板 。 Then in the code editor, right-click and select "Add XML comment". 然后在代码编辑器中,右键单击并选择“添加XML注释”。 In addition, you can generate a documentation (HTML, CHM, docx, VS help, ...) from your comments with the tool. 此外,您可以使用该工具从您的评论中生成文档(HTML,CHM,docx,VS帮助......)。
This is now >6 months old, but I think the answer to this question: Change default XML comment snippet in Visual Studio will get you where you want to be. 现在已经超过6个月了,但我认为这个问题的答案是: 在Visual Studio中更改默认的XML注释片段可以帮助您实现目标。 Just add your custom comment structure to the CDATA
section, and you're all set. 只需将自定义注释结构添加到CDATA
部分,即可完成设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.