可以CSHARP类"继承"在XML文档像Java类? [英] can csharp classes "inherit" the xml documentation like java classes can?

查看:351
本文介绍了可以CSHARP类"继承"在XML文档像Java类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加注释一些CSHARP代码,我利用.NET(或其它)提供的XML语言。我有一个接口,以及一些实现类。我在界面的一种方法,它有一个注释。在实现类没有对实现方法没有任何评论。

i'm adding comments to some csharp code, and i'm using the xml language provided by .net (or something). i have an interface, and some implementing classes. i have one method in the interface, and it has a comment. in the implementing classes there is no comment on the implementing method.

当人做它像这样在Java中,自动地的javadoc生成文档时使用的界面注释。但是,现在,我建我的项目,我得到的警告(瑞典,对不起transalted)的XML注释为可见的类型或成员bla.blabla.blablabla()丢失(cs1591)。这仅仅是一个警告,所以没有那么糟糕。但!!!这意味着没有XML文件是输出的,所以我不能用沙塔生成CHM文档文件,这是我在这里的真正目的.... google搜索编码错误没有放弃:(

when one does it like this in java, javadoc automagically uses the interface comment when generating documentation. however, now that i build my project, i get the warning (transalted from swedish, sorry) "the xml comment for the visible type or member bla.blabla.blablabla() is missing (cs1591)". this is only a warning, so not so bad. but!!! it means no xml file was output, so i can't use sandcastle to generate a chm document file, which is my real goal here.... googling the error coded gave nothing :(

我真的有方法注释复制到所有执行类,像....代码重复D:?有没有办法让行为Java提供

do i really have to copy the method comment to all implementing classes? that's like.... code duplication D: is there no way to get the behavior java offers?

推荐答案

我不知道得到它在XML文件生成时间发生的任何方式,但的 GhostDoc 可以节省你从手动执行复制好。我不能说我虽然用它自己。

I don't know of any way of getting it to happen at XML file generation time, but GhostDoc may well save you from performing the copying manually. I can't say I've used it myself though.

我同意,这将是一个有价值的功能...特别是如果基类(或接口)的派生类后文档更改已经实施和记录。

I agree that it would be a valuable feature... particularly if the base class (or interface) documentation changes after the derived classes have been implemented and documented.

这篇关于可以CSHARP类"继承"在XML文档像Java类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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