TranslationContext

Class

Provides a context for translating virtual DOM nodes into IRenderable using a middleware pipeline.

Namespace: RazorConsole.Core.Rendering.Translation.Contexts
Assembly: RazorConsole.Core

Definition

public sealed class TranslationContext
Remarks: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
NameTypeDescription
TranslationContext(IEnumerable<ITranslationMiddleware>)()ConstructorInitializes a new instance of the TranslationContext class with the specified middleware components.

Properties

4
NameTypeDescription
Other
AnimatedRenderablesHashSet<IAnimatedConsoleRenderable>Gets a collection of animated renderables that require periodic updates during live display.
CollectedOverlaysList<OverlayItem>Gets a collection of overlays that require special rendering in ConsoleRenderer.
CumulativeLeftInt32
CumulativeTopInt32

Methods

1
NameTypeDescription
Translate(VNode)()IRenderableTranslates a virtual DOM node into a IRenderable using the middleware pipeline.