Advising the addition of code comments

Using Metalama Is there a way to advise adding code comments? For example, when I advise a method and inject a new attribute, I would also like to add additional xml code documentation. Here's the exact scenario. [ApiController] public class MyController : ControllerBase { [HttpGet] public ActionResult Get() { return "FooBar"; } } Using a project fabric, I have advised all route methods should introduce [ProducesResponseTypeAttribute(StatusCodes.Status500InternalServerError)]. I would additionally like to introduce code comments to add '''/// <response code="500">It's not you, it's us.</response>'''. I've searched through documentation and couldn't find anything about injecting code comments. Did I miss this, or is it a possible feature request? Thanks!
2 Replies
Gael Fraiteur
Gael Fraiteur2y ago
Hi Nimrey, welcome. No, there is no way for an aspect to contribute XML code doc at the moment.
Gael Fraiteur
Gael Fraiteur2y ago
However you can like/comment the feature request https://github.com/postsharp/Metalama/issues/113
GitHub
Feature request: introduce XML comments · Issue #113 · postsharp/Me...
Especially as Metalama is capable of producing whole new properties, fields and methods to classes (and in the future hopefully, whole classes as well) and since the output can be consumed by other...
Want results from more Discord servers?
Add your server