문제

I am exceptionally anal when it comes to StyleCop. I like to ensure that my class libraries are well laid out, maintainable, and appropriately documented.

Say for example I create an interface:

public interface ICustomImpl
{
    /// <summary>
    /// Say hello!
    /// </summary>
    void SayHello();
}

and then I implement my interface

public class Hello : ICustomImpl
{
    public void SayHello()
    {
        //impl
    }
}

StyleCop will now complain that I have not added a summary tag to my method implementation, however I have a summary tag on the interface.

Are there any known plugins that will automatically copy summary tags where available?

Note: I would like this to work for interface implementations and method overrides.

도움이 되었습니까?

해결책

You are looking for GhostDoc. Well worth the price, it will do what you are looking for, plus write comments from scratch for many different methods and properties.

다른 팁

This is just a tangent to your initial problem and GhostDoc is the correct answer. This is just an alternative:

You could also be able to use the <inheritdoc /> tag for any classes that have derived this interface.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top