Skip to content
ChartForgeX
Class

MermaidC4Document

ChartForgeX.Mermaid

Namespace
ChartForgeX.Mermaid
Assembly
ChartForgeX.Mermaid
Modifiers
sealed

Describes a parsed Mermaid C4 diagram.

Inheritance

Usage

Explore 9 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 1

Accepted by parameters 8

Constructors

public MermaidC4Document() #

Properties

public string DiagramType { get; set; } #

Gets or sets the concrete C4 header token such as C4Context.

public string? Title { get; set; } #

Gets or sets the optional Mermaid title statement.

public string? Direction { get; set; } #

Gets or sets an optional Mermaid direction statement.

public List<MermaidRawStatement> Statements { get; } #

Gets raw C4 statements retained with source spans.

public List<MermaidC4Boundary> Boundaries { get; } #

Gets parsed C4 boundaries and deployment nodes in source order.

public List<MermaidC4Element> Elements { get; } #

Gets parsed C4 elements in source order.

public List<MermaidC4Relationship> Relationships { get; } #

Gets parsed C4 relationships in source order.

public List<MermaidStyleDefinition> ElementStyles { get; } #

Gets supported element style updates in authored order.

public List<MermaidC4RelationshipStyle> RelationshipStyles { get; } #

Gets supported relationship style updates in authored order.

public List<MermaidRawStatement> RetainedStatements { get; } #

Gets retained C4 statements whose semantics are not rendered exactly yet.

public int? MaximumShapesPerRow { get; set; } #

Gets or sets an authored UpdateLayoutConfig shape-row limit; null keeps the native default layout.

public int? MaximumBoundariesPerRow { get; set; } #

Gets or sets an authored UpdateLayoutConfig boundary-row limit; null keeps the native default layout.

Extension Methods

public static byte[] ToPng(MermaidC4Document document, MermaidTopologyRenderOptions? options = null) #

Renders a Mermaid C4 document to static PNG.

Parameters

document ChartForgeX.Mermaid.MermaidC4Document required
options ChartForgeX.Mermaid.MermaidTopologyRenderOptions? = null optional

Returns

byte[]
public static string ToSvg(MermaidC4Document document, MermaidTopologyRenderOptions? options = null) #

Renders a Mermaid C4 document to static SVG.

Parameters

document ChartForgeX.Mermaid.MermaidC4Document required
options ChartForgeX.Mermaid.MermaidTopologyRenderOptions? = null optional

Returns

string
public static TopologyChart ToTopologyChart(MermaidC4Document document, MermaidTopologyRenderOptions? options = null) #

Converts a Mermaid C4 document into a renderer-independent ChartForgeX topology chart.

Parameters

document ChartForgeX.Mermaid.MermaidC4Document required
options ChartForgeX.Mermaid.MermaidTopologyRenderOptions? = null optional
public static VisualArtifact ToVisualArtifact(MermaidC4Document document, MermaidTopologyRenderOptions? options = null) #

Wraps a Mermaid C4 document in a visual artifact envelope backed by a ChartForgeX topology chart.

Parameters

document ChartForgeX.Mermaid.MermaidC4Document required
options ChartForgeX.Mermaid.MermaidTopologyRenderOptions? = null optional