Files
EchoHub/docs/auriondocs/Code/src/EchoHub.Client/UI/Chat/ChatSegment.cs.md
T
Hue 607217b314 docs: Update documentation for 145 files
Generated by AurionDocs
Job ID: 934f8c39-8082-4942-8d17-72ed8f5f8d50
Source commit: 40aea9a
2026-07-23 11:44:20 +02:00

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.