-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any plans to use the Xml comments as the source for the generated markdown? #12
Comments
@StingyJack I don't think it will work. Could you describe your idea in detail? |
.net languages have had xml comments that can be placed before a type or member since like netfx1 or netfx2. They look like this for c#... /// <summary>
/// This class performs an important function.
/// </summary>
public class MyClass {} That is a really trivial example, they can be more complex and detailed. /// <summary>
/// Initializes a new instance of the <see cref="CsExtraction" /> class.
/// </summary>
/// <param name="metadataReferences"></param>
/// <param name="compilationTargets">The compilation targets.</param>
/// <param name="namespaces">The namespaces.</param>
/// <param name="filePath">The file path.</param>
/// <remarks> add some important notes in here </remarks>
/// <example>
/// var ce = new CsExtraction(....etc)
/// </example>
public CsExtraction(IEnumerable<MetadataReference> metadataReferences, IEnumerable<SyntaxTree> compilationTargets, IEnumerable<string> namespaces, string filePath) To add them for a member you can type a triple forward slash before a type or member If these are present in the code and the documentation file generation is enabled, then when the solution is built they are extracted by visual studio/msbuild and placed in a .XML file in the same place the dll or exe is placed. These are the things that power the intellisense and tooltip descriptions for functions when you are typing. You can even make VS fail a compilation if any of these are missing on any public api surface. At my current workplace, there are probably several hundred thousand if not millions of these kinds of comments and more are added every day. I think its safe to say that most .net developers will prefer maintaining the resulting documentation in markdown format more than we would for full html or xml. I like the idea you have here, but as this requires special |
Thanks for explaining. I know what xml-docs are, those for the API documentation and there are plenty of tools to work with them including the msbuild (as you said). Overall I have come up with this approach as the laziest way of creating the docs and automatically keeping the samples up-to-date. There are much more sophisticated platforms for that, like readthedocs, etc. But again, I don't have enough time to cook them in my OSS projects and I don't like writing the documentation in general. But writing the tests is another thing and makes the mental trick for me :-) |
I'd like to use this, but dont want to have to change everything over to a special comment format that wont work with the built in VS features. Would you take pull requests that add this functionality or is that something you arent willing to entertain?
The text was updated successfully, but these errors were encountered: