You can use <inheritdoc .../>
to get pretty close. It seems mainly limited to only reproducing the entire documentation entry, but with that + some careful wording perhaps it can be made to work.
(Slightly modified wording certainly could be much better than documentation gradually falling out of date because of overlooked manual upkeep.)
<inheritdoc>
XML
<inheritdoc [cref=""] [path=""]/>
Inherit XML comments from base classes, interfaces, and similar
methods. Using inheritdoc eliminates unwanted copying and pasting of
duplicate XML comments and automatically keeps XML comments
synchronized.
...
cref
: Specify the member to inherit documentation from. Already
defined tags on the current member are not overridden by the inherited
ones.
path
: The XPath expression query that will result in a node set to show. You can use this attribute to filter the tags to include or exclude from the inherited documentation.
...
Reference: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/recommended-tags#inheritdoc
When you start entering the value for cref
your will get intellisense. It is entirely possible (from a quick test I just did) to specify a namespace.classname.methodname
there so that it can refer to an entirely different class.
So in the example from the question you could do:
public class IsodoseControl : TestModule
{
/// <summary>
/// Verify a control on the dialog
/// </summary>
/// <param name="args">
/// Arguments: [Property, Condition, Expected Value, Tolerance]
/// Properties: STATE, VALUE, LABEL
/// Conditions: Exists, DoesNotExist, IsEnabled, IsDisabled, ...
/// Expected Value (optional): blah blah
/// Tolerance (optional): blah blah blah
/// </param>
public VerifResult VerifyIsodoseControl(string[] args)
{
///...
}
}
public class BeamControl : TestModule
{
/// <inheritdoc cref="IsodoseControl.VerifyIsodoseControl" />
public VerifResult VerifyBeamControl(string[] args)
{
// ...
}
}
For this to make sense, I just removed the word "Isodose" from the "Verify a control on..." sentence. You'll have to decide in your own code if such a rewording is sufficiently clear.
Here's how the intellisense shows up for VerifyBeamControl()
showing the docs:
I did not experiment with the path
attribute. Examples I saw made it seem pretty unreadable, and for my own use that might be a cure worse than the problem.