Class RuntimeOutputBuffer
Collects a session's output in memory, as lines.
public sealed class RuntimeOutputBuffer : IRuntimeOutput
- Inheritance
-
RuntimeOutputBuffer
- Implements
- Inherited Members
Remarks
What a host that answers a "run this" request uses: the caller wants the output back with the
result, not streamed somewhere. A line the program left open with a trailing ; is part of
Lines as soon as it has anything on it, so output that never reached a line break
is still reported.
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
Lines
Every completed line, plus the line in progress when there is one.
public IReadOnlyList<string> Lines { get; }
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()