Class RuntimeOutputRouter
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
Target
Where output currently goes. NullRuntimeOutput — discarded — until something claims it.
public IRuntimeOutput Target { get; set; }
Property Value
Methods
Write(string)
Writes text at the current line position, which advances by its length.
public void Write(string text)
Parameters
textstringThe text to write; it contains no line terminators.
WriteLine()
Ends the current line and returns the line position to 1.
public void WriteLine()