# MermaidBlockDocument

Describes a parsed Mermaid block diagram.

 Class  

`ChartForgeX.Mermaid`

**Namespace**

`ChartForgeX.Mermaid`

**Assembly**

`ChartForgeX.Mermaid`

**Source**

[MermaidBlockDocument.cs:12](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockDocument.cs#L12)

**Base**

`MermaidDocument`

**Modifiers**

sealed

Describes a parsed Mermaid block diagram.

## Inheritance

- [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)
- MermaidBlockDocument

## 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

- Method [MermaidParser.ParseBlock](/api/chartforgex-mermaid-mermaidparser/#method-parseblock-string)

### Accepted by parameters 8

- Extension method [MermaidBlockDocument.ToBlockLayoutBlock](/api/chartforgex-mermaid-mermaidblockdocument/#extension-toblocklayoutblock-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) parameter `document`
- Extension method [MermaidBlockDocument.ToPng](/api/chartforgex-mermaid-mermaidblockdocument/#extension-topng-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) parameter `document`
- Extension method [MermaidBlockDocument.ToSvg](/api/chartforgex-mermaid-mermaidblockdocument/#extension-tosvg-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) parameter `document`
- Extension method [MermaidBlockDocument.ToVisualArtifact](/api/chartforgex-mermaid-mermaidblockdocument/#extension-tovisualartifact-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) parameter `document`
- Method [MermaidBlockRendering.ToBlockLayoutBlock](/api/chartforgex-mermaid-mermaidblockrendering/#method-toblocklayoutblock-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) parameter `document`
- Method [MermaidBlockRendering.ToPng](/api/chartforgex-mermaid-mermaidblockrendering/#method-topng-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) parameter `document`
- Method [MermaidBlockRendering.ToSvg](/api/chartforgex-mermaid-mermaidblockrendering/#method-tosvg-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) parameter `document`
- Method [MermaidBlockRendering.ToVisualArtifact](/api/chartforgex-mermaid-mermaidblockrendering/#method-tovisualartifact-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) parameter `document`

 Filter members   

    Show inherited   

 

## Constructors

 `public MermaidBlockDocument()` [#](#constructor-ctor) 

[MermaidBlockDocument.cs:12](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockDocument.cs#L12)

## Inherited Methods

 `public virtual bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from object

Parameters

**obj object? required**

Returns

 `bool` 

 `public virtual int GetHashCode()` [#](#method-gethashcode) 

Inherited from object

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public virtual string? ToString()` [#](#method-tostring) 

Inherited from object

Returns

 `string?` 

## Properties

 `public List<MermaidRawStatement> Statements { get; }` [#](#property-statements) 

[MermaidBlockDocument.cs:12](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockDocument.cs#L12)

Gets block statements retained in source order.

 `public List<MermaidBlockItem> Items { get; }` [#](#property-items) 

[MermaidBlockDocument.cs:15](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockDocument.cs#L15)

Gets parsed block items in layout order.

 `public List<MermaidBlockEdge> Edges { get; }` [#](#property-edges) 

[MermaidBlockDocument.cs:18](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockDocument.cs#L18)

Gets parsed block edges.

 `public List<MermaidRawStatement> StyleStatements { get; }` [#](#property-stylestatements) 

[MermaidBlockDocument.cs:21](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockDocument.cs#L21)

Gets style and class statements retained with their source locations.

 `public List<MermaidStyleDefinition> ClassDefinitions { get; }` [#](#property-classdefinitions) 

[MermaidBlockDocument.cs:24](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockDocument.cs#L24)

Gets named styles in declaration order.

 `public bool AutoColumns { get; set; }` [#](#property-autocolumns) 

[MermaidBlockDocument.cs:26](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockDocument.cs#L26)

Gets or sets whether source explicitly selects automatic single-row columns.

 `public int? Columns { get; set; }` [#](#property-columns) 

[MermaidBlockDocument.cs:29](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockDocument.cs#L29)

Gets or sets the optional column count.

 `public string? Title { get; set; }` [#](#property-title) 

[MermaidBlockDocument.cs:32](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockDocument.cs#L32)

Gets or sets the optional title statement.

## Inherited Properties

 `public MermaidDiagramKind Kind { get; set; }` [#](#property-kind) 

[MermaidDocument.cs:91](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L91)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public bool IsDiagnosticOnly { get; }` [#](#property-isdiagnosticonly) 

[MermaidDocument.cs:94](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L94)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public string SourceText { get; set; }` [#](#property-sourcetext) 

[MermaidDocument.cs:97](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L97)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public MermaidSourceSpan HeaderSpan { get; set; }` [#](#property-headerspan) 

[MermaidDocument.cs:100](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L100)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public string Header { get; set; }` [#](#property-header) 

[MermaidDocument.cs:103](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L103)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public string? FrontMatter { get; set; }` [#](#property-frontmatter) 

[MermaidDocument.cs:106](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L106)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public VisualAccessibility Accessibility { get; }` [#](#property-accessibility) 

[MermaidDocument.cs:109](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L109)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public string? Theme { get; set; }` [#](#property-theme) 

[MermaidDocument.cs:112](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L112)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public MermaidSourceConfiguration Configuration { get; internal set; }` [#](#property-configuration) 

[MermaidDocument.cs:115](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L115)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public List<MermaidDirective> Directives { get; }` [#](#property-directives) 

[MermaidDocument.cs:118](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L118)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

 `public List<MermaidRawStatement> RawStatements { get; }` [#](#property-rawstatements) 

[MermaidDocument.cs:121](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidDocument.cs#L121)

Inherited from [MermaidDocument](/api/chartforgex-mermaid-mermaiddocument/)

## Extension Methods

 `public static BlockLayoutBlock ToBlockLayoutBlock(MermaidBlockDocument document, MermaidBlockRenderOptions? options = null)` [#](#extension-toblocklayoutblock-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) 

[MermaidBlockRendering.cs:19](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockRendering.cs#L19)

Converts a Mermaid block document into a reusable block-layout visual block.

Parameters

**document ChartForgeX.Mermaid.MermaidBlockDocument required**

**options ChartForgeX.Mermaid.MermaidBlockRenderOptions? = null optional**

Returns

 `BlockLayoutBlock` 

 `public static byte[] ToPng(MermaidBlockDocument document, MermaidBlockRenderOptions? options = null)` [#](#extension-topng-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) 

[MermaidBlockRendering.cs:98](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockRendering.cs#L98)

Renders a Mermaid block document to static PNG.

Parameters

**document ChartForgeX.Mermaid.MermaidBlockDocument required**

**options ChartForgeX.Mermaid.MermaidBlockRenderOptions? = null optional**

Returns

 `byte[]` 

 `public static string ToSvg(MermaidBlockDocument document, MermaidBlockRenderOptions? options = null)` [#](#extension-tosvg-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) 

[MermaidBlockRendering.cs:94](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockRendering.cs#L94)

Renders a Mermaid block document to static SVG.

Parameters

**document ChartForgeX.Mermaid.MermaidBlockDocument required**

**options ChartForgeX.Mermaid.MermaidBlockRenderOptions? = null optional**

Returns

 `string` 

 `public static VisualArtifact ToVisualArtifact(MermaidBlockDocument document, MermaidBlockRenderOptions? options = null)` [#](#extension-tovisualartifact-chartforgex-mermaid-mermaidblockdocument-chartforgex-mermaid-mermaidblockrenderoptions) 

[MermaidBlockRendering.cs:73](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidBlockRendering.cs#L73)

Wraps a Mermaid block document in a visual artifact envelope backed by a block-layout block.

Parameters

**document ChartForgeX.Mermaid.MermaidBlockDocument required**

**options ChartForgeX.Mermaid.MermaidBlockRenderOptions? = null optional**

Returns

 `VisualArtifact` 

<!-- PowerForge markdown artifact sha256:7C12BA024592AB117028A5CEE56647A054826E9666C07972B10AACC9D3053598 -->
