MermaidWriter Class
Writes diagrams and charts as Mermaid text, which MermaidDocument.Parse reads back.
public static class MermaidWriterRemarks
The theme is written when it is one of the themes of Mermaid (DiagramTheme.Dark...); a modified theme is not written. The text measurer is not written.
Methods
| Name | Description |
|---|---|
| Write(ISceneSource) | Writes a diagram or a chart as Mermaid text. |
Write(ISceneSource)
MermaidWriter.csWrites a diagram or a chart as Mermaid text.
public static string Write(ISceneSource diagram)Parameters
diagramISceneSource- The diagram, such as a
FlowchartDiagram, or the chart, such as aPieChart: theMermaidDocument.Contentof a document.
Returns
string The Mermaid text, with line feeds.
Exceptions
ArgumentException- The diagram has an element that Mermaid cannot express, such as an identifier with spaces.
NotSupportedException- The type of the diagram cannot be written.