mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 16:46:08 +02:00
Generated by AurionDocs
Job ID: 934f8c39-8082-4942-8d17-72ed8f5f8d50
Source commit: 40aea9a
992 B
992 B
ChatSegment
File:
src/EchoHub.Client/UI/Chat/ChatSegment.cs
Kind: record
public record ChatSegment(string Text, Attribute? Color)
Parameters:
| Parameter | Type | Default |
|---|---|---|
Text |
string |
— |
Color |
Attribute? |
— |
Represents a colored piece of text within a chat line. It pairs the display text (Text) with an optional color styling (Color). As a record, it is an immutable, value-based container designed to be composed with other ChatSegments to render a full message, applying Color when present; if Color is null, default styling is used.
Remarks
By modeling a chat line as a sequence of ChatSegments, the rendering layer can apply per-segment styling without mixing content and presentation logic. The ChatSegment uses a record to enable value-based equality, which helps with deduplication, testing, and change tracking when chat lines are built from multiple segments.