CodeDocument
Record in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll
What a CodeView shows: the (pretty-printed) text, the language used and its tokens (empty = plain text).
public sealed record CodeDocument(string Text, CodeLanguage Language, IReadOnlyList<CodeToken> Tokens)Parameters
Text: The text to show.Language: The language it was read as.Tokens: The colored ranges; empty for plain text.
Properties
Section titled “Properties”IsHighlighted
Section titled “IsHighlighted”bool IsHighlighted { get; }Whether any range is colored.
Language
Section titled “Language”CodeLanguage Language { get; init; }The language it was read as.
string Text { get; init; }The text to show.
Tokens
Section titled “Tokens”IReadOnlyList<CodeToken> Tokens { get; init; }The colored ranges; empty for plain text.
Fields
Section titled “Fields”static readonly CodeDocument EmptyNo text.