如果类实现了接口中定义的方法,则可以选择是复制文档还是使用<see cref="..." />引用它。
public interface IPerformer
{
/// <summary>
/// Do something useful.
/// </summary>
/// <param name="something">Object to do something with</param>
void Do(Something something);
}
public class Implementation : IPerformer
{
/// <copy from="IPerformer" /> # that is what I want!
public void Do(Something something)
{
// implementation ...
}
}有没有可能让应用程序接口文档工具(Sandcastle)自动复制文档(怎样才能让阅读应用程序接口文档更舒适)?类似于Java Doc中的@inheritDoc?
发布于 2011-06-12 02:45:43
Sandcastle Help File Builder通过inheritdoc tag提供了这一功能。
发布于 2011-06-01 23:29:07
这可能不是你想要的答案,但是GhostDoc可以帮你做到这一点。它会将注释从接口拉到实现中。
发布于 2011-06-02 00:03:25
Jetbrain的Resharper允许你从界面复制注释(或者当你从界面创建实例时,它会自动为你复制它们),但如果你更新了界面的注释,你将不得不删除注释并再次从库中复制注释!
https://stackoverflow.com/questions/6203540
复制相似问题