effort • Writing documentation does not feel as an improvement, as writing more code • At the time of writing, you already understand the current state of the application • People forget to update the documentation after changing the code • Your stakeholders cannot read (your) code • If people discover that documentation is not accurate, they will never trust it
code completion – “MSDN like” documentation – DocFX, Sandcastle, Doxygen • OpenAPI (a.k.a. Swagger) – Machine-readable RESTful API description – As a consumer you can generate a client for the API – Swagger UI allows you to read & interact with an API – Can show payload examples
input of the developer • Generated files are not (easily) accessible – Source control – Hidden path in website – Artifact in your build pipeline • To generate readable and up-to-date documentation, it must be part of a pipeline
and syntactic structure of source code – Syntax Trees › Syntax Nodes › Syntax Tokens › Syntax Trivia • Spans – Position and length within the source text of a Node, Token or Trivia
compile a C# or Visual Basic program, which includes all the assembly references, compiler options, and source files • Symbols – Represents a distinct element declared by the source code or imported from an assembly as metadata • Semantic Model – Represents all the semantic information for a single source file Semantics
• Microsoft.CodeAnalysis.CSharp.Workspaces • Microsoft.Build.Locator Faster Can reuse previous builds Does not support all project types Brittle with different dotnet generations Buildalyzer NuGet • Buildalyzer.Workspaces ' Supports more project types Slower Removes current build output
a lightweight markup language with plain text formatting syntax AsciiDoc AsciiDoc is a human- readable document format using plain-text mark-up conventions PlantUML PlantUML is an open-source tool allowing users to create UML diagrams from a plain text language
a lightweight markup language with plain text formatting syntax AsciiDoc AsciiDoc is a human- readable document format using plain-text mark-up conventions Mermaid Mermaid is a JavaScript-based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams.
documentation from code – https://github.com/dendrodocs – https://www.nuget.org/packages?q=DendroDocs • LivingDocumentation Workshop Get hands-on with Roslyn and generation of documentation yourself – https://github.com/eNeRGy164/LivingDocumentation.Workshop • PlantUML Builder StringBuilder extension methods to make it easier to generate valid PlantUML diagrams – https://github.com/eNeRGy164/PlantUml.Builder – https://www.nuget.org/packages/PlantUml.Builder