TranslationContext
ClassProvides a context for translating virtual DOM nodes into IRenderable using a middleware pipeline.
Namespace:
RazorConsole.Core.Rendering.Translation.ContextsAssembly:
RazorConsole.CoreDefinition
public sealed class TranslationContextRemarks:The TranslationContext orchestrates the translation of VNode instances into IRenderable instances using a chain-of-responsibility pattern. It builds a pipeline from registered ITranslationMiddleware components and executes them in order until one successfully handles the node.
Constructors
1| Name | Type | Description |
|---|---|---|
TranslationContext(IEnumerable<ITranslationMiddleware>)() | Constructor | Initializes a new instance of the TranslationContext class with the specified middleware components. |
Properties
4| Name | Type | Description |
|---|---|---|
Other | ||
AnimatedRenderables | HashSet<IAnimatedConsoleRenderable> | Gets a collection of animated renderables that require periodic updates during live display. |
CollectedOverlays | List<OverlayItem> | Gets a collection of overlays that require special rendering in ConsoleRenderer. |
CumulativeLeft | Int32 | — |
CumulativeTop | Int32 | — |
Methods
1| Name | Type | Description |
|---|---|---|
Translate(VNode)() | IRenderable | Translates a virtual DOM node into a IRenderable using the middleware pipeline. |