Record
public record TocEntry : System.IEquatable<Moka.Docs.Core.Content.TocEntry>
Namespace: Moka.Docs.Core.Content
A single entry in the table of contents.
Inheritance
Implements: System.IEquatable<Moka.Docs.Core.Content.TocEntry>
Properties
| Name | Description |
|---|---|
Children |
Child entries (sub-headings). |
Id |
The anchor ID for linking. |
Level |
The heading level (1-6). |
Text |
The heading text. |
Children
List<TocEntry> TocEntry.Children { get; init; }
Child entries (sub-headings).
Id
string TocEntry.Id { get; init; }
The anchor ID for linking.
Level
int TocEntry.Level { get; init; }
The heading level (1-6).
Text
string TocEntry.Text { get; init; }
The heading text.
Type Relationships
classDiagram
style TocEntry fill:#f9f,stroke:#333,stroke-width:2px
TocEntry ..|> TocEntry~ : implements
View Source
/// <summary>
/// A single entry in the table of contents.
/// </summary>
public sealed record TocEntry
{
/// <summary>The heading level (1-6).</summary>
public required int Level { get; init; }
/// <summary>The heading text.</summary>
public required string Text { get; init; }
/// <summary>The anchor ID for linking.</summary>
public required string Id { get; init; }
/// <summary>Child entries (sub-headings).</summary>
public List<TocEntry> Children { get; init; } = [];
}