docs/CodeDocumentationGuidelines.md
In this document you will find the guidelines for adding XML comments to our codebase. By adding consistent and well-formatted comments to our code, we benefit on all fronts: the online API docs are a useful reference for people looking up our APIs, the IntelliSense inside of Visual Studio will help developers understand our product better, and contributors and maintainers of this repository will have all the documentation at hand.
For comments on our code, we primarily follow the recommended XML tags documentation by Microsoft. These tags are also best supported by Visual Studio. As a rule of thumb, complete your code first and just start typing a triple slash (///) above your code. This will suggest all the attributes we expect to see. The attributes that appear are inferred from your code.
If you're unsure about how to document a certain element, have a look at the .NET API docs wiki which has a very extensive description of what kind of comment to add on which element in the code. We would highly recommend going through that and applying the same style of comments everywhere.
These are the tags that we would like to see when applicable: <summary>, <remarks>, <returns>, <param>, <exception>, <inheritdoc>, <see>, <c>.
<summary><inheritdoc/> on each member
<inheritdoc/> on a class where you want to inherit the comments from an interface, you will have to be explicit about which interface to inherit from. Even if the class only implements one interface. For example: <inheritdoc cref="IEntry"/> will inherit the comments from the IEntry interface.<inheritdoc/> to overridden members; this will potentially cause issues in the online API docs system and doesn't add any value. The documentation is inherited implicitly.<see cref="YourType"/> and <paramref name="parameterName"/> respectively). This will create links in IntelliSense and online API docs<see langword="keyword"/> tag. For example, for true: <see langword="true"/><c></c> tags, which format it as codeIf you are looking for examples, browsing through the codebase, searching for the <summary> tag or /// should give you all kinds of examples.
You can "test" the docs by simply hovering over the type in Visual Studio. The IntelliSense updates should be instantaneous when you have edited something. See the image below for an example.