Can I / How to Import C# triple-slash (///) XML comments into AsciiDoc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can I / How to Import C# triple-slash (///) XML comments into AsciiDoc

royha
Is there a way to automate the importing of C# triple-slash XML code comments into AsciiDoc?

Compiling a C# solution with the /doc switch creates an .xml file with all /// code comments. Is there a way I can import/convert that into an AsciiDoc file or a series of AsciiDoc files?

This would save serious time writing API reference documentation that's on my to-do list.
Reply | Threaded
Open this post in threaded view
|

Re: Can I / How to Import C# triple-slash (///) XML comments into AsciiDoc

mojavelinux
Administrator
I believe what you're talking about are generated API docs (or docstrings). A simple / straightforward way would be to use the include directive to include the files somewhere into the AsciiDoc content (to fuse the content together). Using the include directive, you can include whole files, specific line numbers, or tagged regions. (See https://asciidoctor.org/docs/user-manual/#include-directive).

If that turns out to be too primitive, you could write an extension, such as an include processor, block macro processor, or a tree processor. See https://asciidoctor.org/docs/user-manual/#extensions

Best Regards,

-Dan

On Wed, Sep 2, 2020 at 1:36 PM royha [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Is there a way to automate the importing of C# triple-slash XML code comments into AsciiDoc?

Compiling a C# solution with the /doc switch creates an .xml file with all /// code comments. Is there a way I can import/convert that into an AsciiDoc file or a series of AsciiDoc files?

This would save serious time writing API reference documentation that's on my to-do list.


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Can-I-How-to-Import-C-triple-slash-XML-comments-into-AsciiDoc-tp8210.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux