Can copy XML comments from base class

I have a class that I inherit, and the methods I override should have the same comments as the base. Does resharper have the ability to copy them?

+6
source share
6 answers

Starting with version 3.0 of ReSharper you should have a contextual action available for this, Copy comments from the database . If it is not available, make sure that it is installed in ReSharper | Options | Languages | C# | Context Actions ReSharper | Options | Languages | C# | Context Actions ReSharper | Options | Languages | C# | Context Actions .

+8
source

In addition to the aforementioned contextual action, which I find pretty tedious for every inherited item, you can also set ReSharper to “pull” the default comments when implementing a base class or interface.

To do this, from the ReSharper main menu, go to Options | Code Editing | Member Generation | Other Options Options | Code Editing | Member Generation | Other Options Options | Code Editing | Member Generation | Other Options inside here, you will see the option of copying XML documentation from overridden members, if you check this option, ReSharper will automatically copy all the legacy documentation for you.

enter image description here

+17
source

Let your overridden methods uncomment. Therefore, a short help R # (Ctrl + Shift + F1) will automatically show the help of an element of the base class.

+2
source

This is a duplicate. Is it possible to extend XML documentation from an interface to its implementation?

Answer : press Alt + Ins on the name of each method, select "Copy comments from the database." As indicated by the accepted answer , you must enable this option.

+1
source

This is an old question, but I thought I'd add that resharper supports the tag

  /// <inheritdoc /> 

Using it, an interface comment is also displayed in a tooltip in intellisense.

0
source

I built a tool for post-processing XML documentation files that add support for the <inheritdoc /> tag.

Although it does not help with Intellisense in the source code, it allows you to add XML-modified XML documentation files to the NuGet package and therefore works with Intellisense in the mentioned NuGet packages.

Go to www.inheritdoc.io for more information (free version available).

0
source

Source: https://habr.com/ru/post/895832/


All Articles