Table of Contents

Class CTerminalTextReader

Namespace
ReFuel.CVarScript
Assembly
ReFuel.dll
public class CTerminalTextReader : TextReader, IDisposable
Inheritance
CTerminalTextReader
Implements
Inherited Members

Constructors

CTerminalTextReader(ICTerminal)

public CTerminalTextReader(ICTerminal terminal)

Parameters

terminal ICTerminal

Properties

Terminal

public ICTerminal Terminal { get; }

Property Value

ICTerminal

Methods

Peek()

Reads the next character without changing the state of the reader or the character source. Returns the next available character without actually reading it from the reader.

public override int Peek()

Returns

int

An integer representing the next character to be read, or -1 if no more characters are available or the reader does not support seeking.

Exceptions

ObjectDisposedException

The TextReader is closed.

IOException

An I/O error occurs.

Read()

Reads the next character from the text reader and advances the character position by one character.

public override int Read()

Returns

int

The next character from the text reader, or -1 if no more characters are available. The default implementation returns -1.

Exceptions

ObjectDisposedException

The TextReader is closed.

IOException

An I/O error occurs.

Read(Span<char>)

Reads the characters from the current reader and writes the data to the specified buffer.

public override int Read(Span<char> buffer)

Parameters

buffer Span<char>

When this method returns, contains the specified span of characters replaced by the characters read from the current source.

Returns

int

The number of characters that have been read. The number will be less than or equal to the buffer length, depending on whether the data is available within the reader. This method returns 0 (zero) if it is called when no more characters are left to read.

Exceptions

ArgumentNullException

buffer is null.

IOException

The number of characters read from the stream is larger than the length of the buffer.