C # XML Method Documentation in Abstract Classes

I have a generic abstract base class that has some methods on it. These methods have XML comments on them as such:

/// <summary>
///     Controller for working with instances of {TModel}
/// </summary>
public abstract class BaseController<TModel> : ApiController
{
    /// <summary>
    ///     Creates a {TModel}.
    /// </summary>
    [HttpPost]
    public Task<TModel> Post([FromBody] TModel model)
    {
        ...
        return ...
    }
}

I would like to be able to implement it as such:

/// <summary>
///     Controller for working with instances of PersonModel
/// </summary>
public class PersonController : BaseController<PersonModel>
{
}

And XML comments are created for the PersonController, which mimic the comments for the base class. This will do something like https://github.com/domaindrivendev/Swashbuckle to pick up my XML comments and display them well for PersonController.

Currently, comments are published as follows:

<?xml version="1.0"?>
<doc>
    <assembly>
        <name>MyLibrary</name>
    </assembly>
    <members>
        <member name="T:MyLibrary.PersonController">
            <summary>
                Controller for working with instances of PersonModel
            </summary>
        </member>
        <member name="T:MyLibrary.BaseController`1">
            <summary>
                Controller for working with instances of {TModel}
            </summary>
        </member>
        <member name="M:MyLibrary.BaseController`1.Post(`0)">
            <summary>
                Creates a {TModel}.
            </summary>
        </member>
    </members>
</doc>

I would like it to also include method documentation for the post method on PersonController:

...
<member name="M:MyLibrary.PersonController.Post(`0)">
    <summary>
        Creates a PersonModel.
    </summary>
</member>
...

, , , , . - ?

+4

:

3575
?
2397
#?
2058
# ?
1743
- # ?
1742
#?
1507
?
1476
#?

All Articles