Skip to content
ChartForgeX
Class

MermaidRailroadDocument

ChartForgeX.Mermaid

Namespace
ChartForgeX.Mermaid
Assembly
ChartForgeX.Mermaid
Modifiers
sealed

A source-preserving railroad grammar lowered to the reusable native expression model.

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 MermaidRailroadDocument() #

Properties

public MermaidRailroadDialect Dialect { get; set; } #

Gets or sets the selected source notation.

public string? Title { get; set; } #

Gets or sets the optional diagram title.

public List<MermaidRailroadRule> Rules { get; } #

Gets rules in source order.

public List<MermaidRawStatement> Statements { get; } #

Gets raw rule statements with original source spans.

Extension Methods

public static byte[] ToPng(MermaidRailroadDocument document, MermaidRailroadRenderOptions? options = null) #

Renders PNG through the same native scene and captured output policy.

Parameters

document ChartForgeX.Mermaid.MermaidRailroadDocument required
options ChartForgeX.Mermaid.MermaidRailroadRenderOptions? = null optional

Returns

byte[]
public static RailroadDiagramBlock ToRailroadDiagramBlock(MermaidRailroadDocument document, MermaidRailroadRenderOptions? options = null) #

Creates a naturally measured native diagram without expanding recursive rule references or repetition counts.

Parameters

document ChartForgeX.Mermaid.MermaidRailroadDocument required
options ChartForgeX.Mermaid.MermaidRailroadRenderOptions? = null optional
public static string ToSvg(MermaidRailroadDocument document, MermaidRailroadRenderOptions? options = null) #

Renders the shared native SVG scene.

Parameters

document ChartForgeX.Mermaid.MermaidRailroadDocument required
options ChartForgeX.Mermaid.MermaidRailroadRenderOptions? = null optional

Returns

string
public static VisualArtifact ToVisualArtifact(MermaidRailroadDocument document, MermaidRailroadRenderOptions? options = null) #

Wraps the measured native producer in the existing bounded Mermaid artifact policy.

Parameters

document ChartForgeX.Mermaid.MermaidRailroadDocument required
options ChartForgeX.Mermaid.MermaidRailroadRenderOptions? = null optional