Hi,
I am trying to create custom rules to be triggered when documenting Unit test cases.
One of them is as follows :
public async Task Add_CallRouteWithTemplate_ShouldReturnTemplateViewModel()
My goal is to make GhostDoc generate something the closest to :
/// <summary>
/// Calling the <see cref="Add"/> route [with template] should return a <see cref="TemplateViewModel"/>.
/// </summary>
I can easily match the method name using a regex like the following :
(?<route>.*)_CallRoute(?<condition>.*)_ShouldReturn(?<returntype>.*)
But now, how can I extract the different named groups to generate the appropriate comment ? I tried looking in the Dictionary as well, to override the summary with the above regular expression but it seems that only
<pattern>
is a recognized name for a group.
Best regards.