Mermaid
editThe Meziantou.Framework.Mermaid package reads the text format of Mermaid into the diagrams of this library, and writes them back as Mermaid:
dotnet package add Meziantou.Framework.Mermaidvar text = """
---
title: Order processing
config:
theme: forest
---
flowchart LR
start([Order received]) --> check{Payment valid?}
check -->|yes| ship[Ship the order]
check -->|no| cancel[Cancel the order]
""";
var document = MermaidDocument.Parse(text);
var flowchart = (FlowchartDiagram)document.Content;
var svg = flowchart.ToSvg();Each page of the diagram types gives the Mermaid syntax the type reads. See the Mermaid documentation for the shared syntax, the errors, the warnings and the writer.