C# Class NArrange.Core.PeekingTextReader

The peeking text editor allows infinite peeking compared to the normal text reader which only allows one character at a time.
Inheritance: System.IO.TextReader
Mostrar archivo Open project: MarcStan/NArrange Class Usage Examples

Public Methods

Method Description
Close ( ) : void
Peek ( ) : int

When called will peek the next character that was not yet read. Same as TextReader

PeekAhead ( ) : int

Peek method that will advance one character on each peek without changing the readers state (it does so by reading to an internal buffer that is later fed back to Read()). You can read all the way to the end of the file without affecting Read(). The next time read is called the internal buffer will be dequeue until it is empty.

PeekingTextReader ( TextReader textReader ) : System

Creates a new instance of the peeking text reader using the provided text reader as the underlying source.

Read ( ) : int
Read ( char buffer, int index, int count ) : int
ReadBlock ( char buffer, int index, int count ) : int
ReadLine ( ) : string
ReadToEnd ( ) : string

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Method Details

Close() public method

public Close ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

Peek() public method

When called will peek the next character that was not yet read. Same as TextReader
public Peek ( ) : int
return int

PeekAhead() public method

Peek method that will advance one character on each peek without changing the readers state (it does so by reading to an internal buffer that is later fed back to Read()). You can read all the way to the end of the file without affecting Read(). The next time read is called the internal buffer will be dequeue until it is empty.
public PeekAhead ( ) : int
return int

PeekingTextReader() public method

Creates a new instance of the peeking text reader using the provided text reader as the underlying source.
public PeekingTextReader ( TextReader textReader ) : System
textReader System.IO.TextReader
return System

Read() public method

public Read ( ) : int
return int

Read() public method

public Read ( char buffer, int index, int count ) : int
buffer char
index int
count int
return int

ReadBlock() public method

public ReadBlock ( char buffer, int index, int count ) : int
buffer char
index int
count int
return int

ReadLine() public method

public ReadLine ( ) : string
return string

ReadToEnd() public method

public ReadToEnd ( ) : string
return string