# MermaidClassRelationship

Describes a Mermaid class relationship.

 Class  

`ChartForgeX.Mermaid`

**Namespace**

`ChartForgeX.Mermaid`

**Assembly**

`ChartForgeX.Mermaid`

**Source**

[MermaidClassDocument.cs:122](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidClassDocument.cs#L122)

**Base**

`MermaidAstNode`

**Modifiers**

sealed

Describes a Mermaid class relationship.

## Inheritance

- [MermaidAstNode](/api/chartforgex-mermaid-mermaidastnode/)
- MermaidClassRelationship

## Usage

 Explore 1 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

- Property [MermaidClassDocument.Relationships](/api/chartforgex-mermaid-mermaidclassdocument/#property-relationships)

 Filter members   

    Show inherited   

 

## Constructors

 `public MermaidClassRelationship(string sourceId, string targetId, string connector, string? label, MermaidSourceSpan span)` [#](#constructor-ctor-string-string-string-string-chartforgex-mermaid-mermaidsourcespan) 

[MermaidClassDocument.cs:122](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidClassDocument.cs#L122)

Initializes a class relationship.

Parameters

**sourceId string required**

**targetId string required**

**connector string required**

**label string? required**

**span ChartForgeX.Mermaid.MermaidSourceSpan required**

## 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 string SourceId { get; }` [#](#property-sourceid) 

[MermaidClassDocument.cs:137](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidClassDocument.cs#L137)

Gets the source class id.

 `public string TargetId { get; }` [#](#property-targetid) 

[MermaidClassDocument.cs:140](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidClassDocument.cs#L140)

Gets the target class id.

 `public string Connector { get; }` [#](#property-connector) 

[MermaidClassDocument.cs:143](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidClassDocument.cs#L143)

Gets the Mermaid relationship connector.

 `public bool SourceIsInterface { get; }` [#](#property-sourceisinterface) 

[MermaidClassDocument.cs:146](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidClassDocument.cs#L146)

Gets whether the source endpoint is a distinct lollipop interface rather than a class.

 `public bool TargetIsInterface { get; }` [#](#property-targetisinterface) 

[MermaidClassDocument.cs:149](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidClassDocument.cs#L149)

Gets whether the target endpoint is a distinct lollipop interface rather than a class.

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

[MermaidClassDocument.cs:152](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidClassDocument.cs#L152)

Gets or sets the source endpoint multiplicity.

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

[MermaidClassDocument.cs:155](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidClassDocument.cs#L155)

Gets or sets the target endpoint multiplicity.

 `public string? Label { get; }` [#](#property-label) 

[MermaidClassDocument.cs:158](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Mermaid/MermaidClassDocument.cs#L158)

Gets the optional relationship label.

## Inherited Properties

 `public MermaidSourceSpan Span { get; }` [#](#property-span) 

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

Inherited from [MermaidAstNode](/api/chartforgex-mermaid-mermaidastnode/)

<!-- PowerForge markdown artifact sha256:101F5695A8728A3CC9F8D9ED31A12E3928EE08EFEF5E36F35C4EB75C8569AAEA -->
