Table of Contents

Interface IMarkupStyleResolver

Namespace
ItTiger.TigerCli.Markup
Assembly
ItTiger.TigerCli.dll
Resolves a curated semantic markup token (e.g. Accent, Alert) to concrete foreground/background colours. Keeps CliMarkupParser pure: the parser depends only on this abstraction, never on a theme or global console state.
public interface IMarkupStyleResolver

Methods

IsHyperlinkToken(string)

Returns true when name (case-insensitive) is a hyperlink token — a semantic style whose span's visible text is also its hyperlink target (e.g. Link). When the parser sees such a token it derives the target from the span's visible text and rejects nesting another hyperlink token inside it. Defaults to false so existing resolvers need no change; only link-aware resolvers override it.
bool IsHyperlinkToken(string name)

Parameters

name string

Returns

bool

TryResolve(string, out CliColor?, out CliColor?, out CliTextDecoration)

Tries to resolve name (case-insensitive) to a semantic style. Returns false for names that are not curated semantic tokens, so the parser can fall back to raw colour parsing. A null channel means "inherit": foreground-only tokens return a null background so the surrounding background is preserved. decorations carries any bold/italic/underline flags the semantic style defines; None when it defines none. The parser ORs these onto the surrounding effective decorations.
bool TryResolve(string name, out CliColor? foreground, out CliColor? background, out CliTextDecoration decorations)

Parameters

name string
foreground CliColor?
background CliColor?
decorations CliTextDecoration

Returns

bool