VdomSpectreTranslator
ClassStatic helper methods for translating VNodes to Spectre.Console renderables.
Namespace:
RazorConsole.Core.Rendering.VdomAssembly:
RazorConsole.CoreDefinition
public static class VdomSpectreTranslatorMethods
15| Name | Type | Description |
|---|---|---|
CollectInnerText(VNode)() | String | Collects all inner text content from a VNode and its children. |
ComposeChildContent(IReadOnlyList<IRenderable>)() | IRenderable | Composes multiple child renderables into a single renderable. |
EnumerateClassNames(string?)() | IEnumerable<String> | Enumerates class names from a space-separated class attribute value. |
GetAttribute(VNode, string)() | String | Gets an attribute value from a VNode. |
HasClass(VNode, string)() | Boolean | Checks if a VNode has a specific CSS class. |
NormalizeTextNode(string?)() | NormalizedText | Normalizes a text node by trimming whitespace and collapsing multiple spaces. |
ParseHorizontalAlignment(string?)() | HorizontalAlignment | Parses a horizontal alignment value from a string. |
ParseOptionalPositiveInt(string?)() | Nullable<Int32> | Parses an optional positive integer from a string. |
ParseVerticalAlignment(string?)() | VerticalAlignment | Parses a vertical alignment value from a string. |
ShouldBeBlock(VNode)() | Boolean | Determines if a VNode should be rendered as a block element. |
TryGetBoolAttribute(VNode, string, out bool)() | Boolean | Tries to get a boolean attribute value from a VNode. |
TryGetIntAttribute(VNode, string, int)() | Int32 | Tries to get an integer attribute value from a VNode. |
TryParsePadding(string?, out Padding?)() | Boolean | Tries to parse a padding value from a string. |
TryParsePositiveDouble(string?, out double)() | Boolean | Tries to parse a positive double from a string. |
TryParsePositiveInt(string?, out int)() | Boolean | Tries to parse a positive integer from a string. |