简体   繁体   English

Visual Studio:生成代码的自动文档

[英]Visual Studio: auto documentation for generated code

how can I generate a template with documentaton (doxygen) for auto-generated code? 如何为自动生成的代码生成带有documentaton(doxygen)的模板?

To be more precisly: I'm using several connected services in my C# application. 更精确地说:我在C#应用程序中使用了几个连接的服务。 Thus Visual studio generates some files including "Reference.cs" with a wrapper class to the methods of a WCF service. 因此,Visual Studio使用WCF服务的方法的包装器类生成一些文件,包括“ Reference.cs”。

Now I'm generating doxygen documentation for my entire project and get blank namespace and class documentation. 现在,我将为整个项目生成doxygen文档,并获取空白的名称空间和类文档。

eg 例如

//------------------------------------------------------------------------------
// <auto-generated>
//     Dieser Code wurde von einem Tool generiert.
//     Laufzeitversion:4.0.30319.42000
//
//     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
//     der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------

/// COMMENT NEEDED
namespace MyApp.ActionService {
[...]   

/// COMMENT NEEDED
public interface IActionsService {

[...]

/// COMMENT NEEDED
public partial class ActionsServiceClient : [...]

What I need is a general doxygen comment such as "autogenerated class" in every COMMENT NEEDED section of my code snippet. 我需要的是通用的doxygen注释,例如我的代码片段的每个COMMENT NEEDED部分中的“ autogeneable class”。 Note: I added the COMMENT NEEDED comments just to illustrate my problem. 注意:我添加了COMMENT NEEDED注释只是为了说明我的问题。 They are not part of the generator output. 它们不是发电机输出的一部分。

Is it possible to edit a template for the code generator? 是否可以为代码生成器编辑模板?

It appears VS does not use editable T4 templates to generate proxy classes as in other auto-gen senarios. 似乎VS不像其他自动生成传感器那样使用可编辑的T4模板来生成代理类。 You may be able to use a tool built against svutil for this. 为此,您也许可以使用针对svutil构建的工具。

Custom WSDL Publication 定制WSDL发布

Make svcutil pick up documentation from C# files? 使svcutil从C#文件中提取文档?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 自动生成的代码在Visual Studio 2015中引发很多警告 - auto-generated code throw lots of warning in visual studio 2015 是否可以在visual studio中更改自动生成的事件处理程序代码? - Is it possible to alter the auto generated event handler code within visual studio? Visual Studio 从 gRPC.proto 文件自动生成代码 - Visual Studio auto generated code from gRPC .proto file 在Visual Studio中生成的中间代码 - Intermediate code generated in visual studio 在visual studio 2010中自动生成捕获 - auto generated catch in visual studio 2010 Visual Studio Code 中的 Unity hover 文档 - Unity hover documentation in Visual Studio Code 将xml-stylesheet声明添加到Visual Studio生成的XML文档中 - Adding xml-stylesheet declaration to Visual Studio generated XML documentation 您如何在Visual Studio中查看c#控件的自动生成的设计器代码? - How do you view the auto generated designer code for c# controls in Visual Studio? WPF中自动生成的代码显示错误。 (C#,WPF,Visual Studio社区2013) - Auto-generated code in WPF shows error. (C#, WPF, Visual Studio Community 2013) 生成文件的 Visual Studio 代码分析 - Visual studio code analysis for generated files
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM