Reputation: 1758
Visual Studio 2017, ReSharper 2017, C# project
I am trying to inherit the documentation of a method's parameter by using the select
attribute, but it doesn't seem to work as expected.
According to this article ( http://tunnelvisionlabs.github.io/SHFB/docs-master/SandcastleBuilder/html/79897974-ffc9-4b84-91a5-e50c66a0221d.htm ) documentation can be filtered using the select
attribute, and one of the examples show it being used as such:
/// <example>
/// <inheritdoc cref="MethodWithTwoExamples"
/// select="span[@id='Example 2']" />
/// </example>
So in a similar fashion I try to filter the documentation this way:
/// <param name="generateStream"><inheritdoc cref="MyClass.MyMethod" select="param[@name='generateStream']"/></param>
but the problem with it is that Visul Studio Intellisense doesn't display the documentation of that specific parameter, but instead it shows the documentation of the first parameter of the method I'm trying to inherit the documentation from.
So my question is: is it possible to filter documentation down to a specific parameter of a method?
Upvotes: 32
Views: 8423
Reputation: 1286
What you are asking for is possible with Visual Studio 2019 (16.9.3). I had the same problem myself and found a discussion here:
https://github.com/doxygen/doxygen/issues/7356/#issuecomment-547905295
which pointed me to the right direction.
First, as select
is deprecated, you have to use path
instead.
Second, you have to prefix the XPath part with a slash (/
) so that
your XML doc will look like this:
/// <param name="generateStream"><inheritdoc cref="MyClass.MyMethod" path="/param[@name='generateStream']"/></param>
Upvotes: 56
Reputation: 969
I don't think it is possible to show inherited documentation in IntelliSense at all due to this UserVoice item here.
Upvotes: 0