# MermaidPacketDocument

Describes a parsed Mermaid packet diagram.

 Class  

`ChartForgeX.Mermaid`

**Namespace**

`ChartForgeX.Mermaid`

**Assembly**

`ChartForgeX.Mermaid`

**Source**

[MermaidPacketDocument.cs:13](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidPacketDocument.cs#L13)

**Base**

`MermaidDocument`

**Modifiers**

sealed

Describes a parsed Mermaid packet diagram.

## Inheritance

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

## 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.ParsePacket](/api/chartforgex-mermaid-mermaidparser/#method-parsepacket-string)

### Accepted by parameters 8

- Extension method [MermaidPacketDocument.ToPacketLayoutBlock](/api/chartforgex-mermaid-mermaidpacketdocument/#extension-topacketlayoutblock-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) parameter `document`
- Extension method [MermaidPacketDocument.ToPng](/api/chartforgex-mermaid-mermaidpacketdocument/#extension-topng-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) parameter `document`
- Extension method [MermaidPacketDocument.ToSvg](/api/chartforgex-mermaid-mermaidpacketdocument/#extension-tosvg-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) parameter `document`
- Extension method [MermaidPacketDocument.ToVisualArtifact](/api/chartforgex-mermaid-mermaidpacketdocument/#extension-tovisualartifact-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) parameter `document`
- Method [MermaidPacketRendering.ToPacketLayoutBlock](/api/chartforgex-mermaid-mermaidpacketrendering/#method-topacketlayoutblock-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) parameter `document`
- Method [MermaidPacketRendering.ToPng](/api/chartforgex-mermaid-mermaidpacketrendering/#method-topng-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) parameter `document`
- Method [MermaidPacketRendering.ToSvg](/api/chartforgex-mermaid-mermaidpacketrendering/#method-tosvg-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) parameter `document`
- Method [MermaidPacketRendering.ToVisualArtifact](/api/chartforgex-mermaid-mermaidpacketrendering/#method-tovisualartifact-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) parameter `document`

 Filter members   

    Show inherited   

 

## Constructors

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

[MermaidPacketDocument.cs:13](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidPacketDocument.cs#L13)

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

[MermaidPacketDocument.cs:13](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidPacketDocument.cs#L13)

Gets packet statements retained in source order.

 `public List<MermaidPacketField> Fields { get; }` [#](#property-fields) 

[MermaidPacketDocument.cs:16](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidPacketDocument.cs#L16)

Gets parsed packet fields.

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

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

Gets or sets the optional packet 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 PacketLayoutBlock ToPacketLayoutBlock(MermaidPacketDocument document, MermaidPacketRenderOptions? options = null)` [#](#extension-topacketlayoutblock-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) 

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

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

Parameters

**document ChartForgeX.Mermaid.MermaidPacketDocument required**

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

Returns

 `PacketLayoutBlock` 

 `public static byte[] ToPng(MermaidPacketDocument document, MermaidPacketRenderOptions? options = null)` [#](#extension-topng-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) 

[MermaidPacketRendering.cs:69](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidPacketRendering.cs#L69)

Renders a Mermaid packet document to static PNG.

Parameters

**document ChartForgeX.Mermaid.MermaidPacketDocument required**

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

Returns

 `byte[]` 

 `public static string ToSvg(MermaidPacketDocument document, MermaidPacketRenderOptions? options = null)` [#](#extension-tosvg-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) 

[MermaidPacketRendering.cs:65](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidPacketRendering.cs#L65)

Renders a Mermaid packet document to static SVG.

Parameters

**document ChartForgeX.Mermaid.MermaidPacketDocument required**

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

Returns

 `string` 

 `public static VisualArtifact ToVisualArtifact(MermaidPacketDocument document, MermaidPacketRenderOptions? options = null)` [#](#extension-tovisualartifact-chartforgex-mermaid-mermaidpacketdocument-chartforgex-mermaid-mermaidpacketrenderoptions) 

[MermaidPacketRendering.cs:45](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidPacketRendering.cs#L45)

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

Parameters

**document ChartForgeX.Mermaid.MermaidPacketDocument required**

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

Returns

 `VisualArtifact` 

<!-- PowerForge markdown artifact sha256:D5D4FE6E0389134D6A765FF75C6869F8E05EAE225348708934F989A76C4AC32E -->
