Table of Contents

Class RuntimeOutputRouter

Namespace
RDCore.SDK.Runtime.Abstract.Execution
Assembly
RDCore.SDK.dll

An output channel whose destination can be changed while the session runs.

public sealed class RuntimeOutputRouter : IRuntimeOutput
Inheritance
RuntimeOutputRouter
Implements
Inherited Members

Remarks

A session is composed once and lives for as long as the host does, but the thing that wants its output changes: each "run this and tell me what it printed" request wants that run's output and nobody else's. Routing lets the session keep one output channel for its whole life while each run points it at its own buffer — without a session having to be re-composed, or its Output being mutable for everyone.

Properties

LinePosition

The current line position, one-based — 1 at the start of a line, exactly as MS-VBAL §5.4.5 counts it.

public int LinePosition { get; }

Property Value

int

Target

Where output currently goes. NullRuntimeOutput — discarded — until something claims it.

public IRuntimeOutput Target { get; set; }

Property Value

IRuntimeOutput

Methods

Write(string)

Writes text at the current line position, which advances by its length.

public void Write(string text)

Parameters

text string

The text to write; it contains no line terminators.

WriteLine()

Ends the current line and returns the line position to 1.

public void WriteLine()