# MermaidTreeViewDocument

Describes a parsed Mermaid tree view diagram.

 Class  

`ChartForgeX.Mermaid`

**Namespace**

`ChartForgeX.Mermaid`

**Assembly**

`ChartForgeX.Mermaid`

**Source**

[MermaidTreeViewDocument.cs:11](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreeViewDocument.cs#L11)

**Base**

`MermaidDocument`

**Modifiers**

sealed

Describes a parsed Mermaid tree view diagram.

## Inheritance

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

## Usage

 Explore 11 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.ParseTreeView](/api/chartforgex-mermaid-mermaidparser/#method-parsetreeview-string)

### Accepted by parameters 10

- Method [MermaidTopologyRendering.ToTopologyChart](/api/chartforgex-mermaid-mermaidtopologyrendering/#method-totopologychart-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtopologyrenderoptions) parameter `document`
- Extension method [MermaidTreeViewDocument.ToPng](/api/chartforgex-mermaid-mermaidtreeviewdocument/#extension-topng-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) parameter `document`
- Extension method [MermaidTreeViewDocument.ToSvg](/api/chartforgex-mermaid-mermaidtreeviewdocument/#extension-tosvg-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) parameter `document`
- Extension method [MermaidTreeViewDocument.ToTopologyChart](/api/chartforgex-mermaid-mermaidtreeviewdocument/#extension-totopologychart-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtopologyrenderoptions) parameter `document`
- Extension method [MermaidTreeViewDocument.ToTreeViewBlock](/api/chartforgex-mermaid-mermaidtreeviewdocument/#extension-totreeviewblock-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) parameter `document`
- Extension method [MermaidTreeViewDocument.ToVisualArtifact](/api/chartforgex-mermaid-mermaidtreeviewdocument/#extension-tovisualartifact-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) parameter `document`
- Method [MermaidTreeViewRendering.ToPng](/api/chartforgex-mermaid-mermaidtreeviewrendering/#method-topng-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) parameter `document`
- Method [MermaidTreeViewRendering.ToSvg](/api/chartforgex-mermaid-mermaidtreeviewrendering/#method-tosvg-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) parameter `document`
- Method [MermaidTreeViewRendering.ToTreeViewBlock](/api/chartforgex-mermaid-mermaidtreeviewrendering/#method-totreeviewblock-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) parameter `document`
- Method [MermaidTreeViewRendering.ToVisualArtifact](/api/chartforgex-mermaid-mermaidtreeviewrendering/#method-tovisualartifact-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) parameter `document`

 Filter members   

    Show inherited   

 

## Constructors

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

[MermaidTreeViewDocument.cs:11](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreeViewDocument.cs#L11)

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

[MermaidTreeViewDocument.cs:11](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreeViewDocument.cs#L11)

Gets retained non-empty tree view statements.

 `public List<MermaidTreeViewNode> Roots { get; }` [#](#property-roots) 

[MermaidTreeViewDocument.cs:14](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreeViewDocument.cs#L14)

Gets top-level tree view nodes.

 `public List<MermaidTreeViewNode> Nodes { get; }` [#](#property-nodes) 

[MermaidTreeViewDocument.cs:17](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreeViewDocument.cs#L17)

Gets all tree view nodes in source order.

## 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 byte[] ToPng(MermaidTreeViewDocument document, MermaidTreeViewRenderOptions? options = null)` [#](#extension-topng-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) 

[MermaidTreeViewRendering.cs:52](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreeViewRendering.cs#L52)

Renders native PNG through the same mark and positioned-text scene.

Parameters

**document ChartForgeX.Mermaid.MermaidTreeViewDocument required**

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

Returns

 `byte[]` 

 `public static string ToSvg(MermaidTreeViewDocument document, MermaidTreeViewRenderOptions? options = null)` [#](#extension-tosvg-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) 

[MermaidTreeViewRendering.cs:50](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreeViewRendering.cs#L50)

Renders the shared static SVG row scene.

Parameters

**document ChartForgeX.Mermaid.MermaidTreeViewDocument required**

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

Returns

 `string` 

 `public static TopologyChart ToTopologyChart(MermaidTreeViewDocument document, MermaidTopologyRenderOptions? options = null)` [#](#extension-totopologychart-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtopologyrenderoptions) 

[MermaidTopologyRendering.cs:104](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTopologyRendering.cs#L104)

Converts a Mermaid tree view to a topology chart.

Parameters

**document ChartForgeX.Mermaid.MermaidTreeViewDocument required**

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

Returns

 `TopologyChart` 

 `public static TreeViewBlock ToTreeViewBlock(MermaidTreeViewDocument document, MermaidTreeViewRenderOptions? options = null)` [#](#extension-totreeviewblock-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) 

[MermaidTreeViewRendering.cs:14](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreeViewRendering.cs#L14)

Creates measured rows in source order without turning filenames into network nodes.

Parameters

**document ChartForgeX.Mermaid.MermaidTreeViewDocument required**

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

Returns

 `TreeViewBlock` 

 `public static VisualArtifact ToVisualArtifact(MermaidTreeViewDocument document, MermaidTreeViewRenderOptions? options = null)` [#](#extension-tovisualartifact-chartforgex-mermaid-mermaidtreeviewdocument-chartforgex-mermaid-mermaidtreeviewrenderoptions) 

[MermaidTreeViewRendering.cs:36](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidTreeViewRendering.cs#L36)

Wraps native rows in the existing bounded Mermaid export policy.

Parameters

**document ChartForgeX.Mermaid.MermaidTreeViewDocument required**

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

Returns

 `VisualArtifact` 

<!-- PowerForge markdown artifact sha256:8453C9345C423932D89F1EF45A87F1A4FECDEE3D8BE233572F6E09E05DD349E5 -->
