简体   繁体   中英

Visual Studio: auto documentation for generated code

how can I generate a template with documentaton (doxygen) for auto-generated code?

To be more precisly: I'm using several connected services in my C# application. Thus Visual studio generates some files including "Reference.cs" with a wrapper class to the methods of a WCF service.

Now I'm generating doxygen documentation for my entire project and get blank namespace and class documentation.

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. Note: I added the COMMENT NEEDED comments just to illustrate my problem. 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. You may be able to use a tool built against svutil for this.

Custom WSDL Publication

Make svcutil pick up documentation from C# files?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM