Open realbart opened 3 months ago
When I started this, i actually copied them. The problem is that it was diffcult to get the raw XML strings - I had only access to the parsed comments, and putting them into XML again is not trivial and error prone. I am open to suggestions
I’ll see if I succeed in doing it myself. But as it is, I think no xml docs is better then inheritdoc.
It should be possible to use inheritdoc with a specific cref
like this to pull class comments onto the interface:
/// <inheritdoc cref="ClassName.MethodName{Generic1,Generic2}(Param1Type,Param2Type)"/>
It worked for this random method I tried it on in Rider. I don't know how hard it is to write as as source generator.
It should be possible to use inheritdoc with a specific
cref
like this to pull class comments onto the interface:/// <inheritdoc cref="ClassName.MethodName{Generic1,Generic2}(Param1Type,Param2Type)"/>
It worked for this random method I tried it on in Rider. I don't know how hard it is to write as as source generator.
@fjmorel This appears to work, at least for Jetbrains Rider. I have submitted a PR (#63) and my initial testing seems positive.
As interfaces are typically at the top of the inheritance chain (interface -> abstract class -> concrete class) inheriting documentation does not make sense.
In manual code, inheritdoc is often used in the concrete class, but since we generate our interface, we put the xml documentation in the class itself. Inheriting bottom up does not work, so if you want to do anything with xml comments at all, I'd suggest you simply copy them.