Can I propagate XML documentation from an interfac

2020-02-13 07:23发布

I need to propagate XML documentation from a base class to derivative(s) or from an interface to implementation(s).

Can I do this using Resharper?

2条回答
Viruses.
2楼-- · 2020-02-13 07:58

Starting from 2016.2 EAP 9, ReSharper supports the <inheritdoc /> tag (RSRP-33352). You will see the accumulated documentation using QuickDoc (default on Ctrl+Shift+F1).

The Members Generation option page has been extended by another option to automatically add that tag to any generated member. You will also have a context action on members, which don't have a documentation yet.

enter image description here

I can also recommend the XmlDoc Inspections plugin, which is somehow related to the topic.

查看更多
老娘就宠你
3楼-- · 2020-02-13 08:13

Yes you can.

If you're yet to implement/override members, then in a derived class or interface implementation, click Alt+Ins, choose "Overriding members" or "Implement missing members". In the wizard that displays afterwards, choose members to implement/override, and make sure to select "Copy XML documentation".

Alternatively, if you already have an overridden or implemented member in place, press Alt+Enter on the overridden/implemented member, and select "Copy comments from base".

查看更多
登录 后发表回答