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
Afficher le fichier Open project: MarcStan/NArrange Class Usage Examples

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Method Details

Close() public méthode

public Close ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

Peek() public méthode

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

PeekAhead() public méthode

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
Résultat int

PeekingTextReader() public méthode

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
Résultat System

Read() public méthode

public Read ( ) : int
Résultat int

Read() public méthode

public Read ( char buffer, int index, int count ) : int
buffer char
index int
count int
Résultat int

ReadBlock() public méthode

public ReadBlock ( char buffer, int index, int count ) : int
buffer char
index int
count int
Résultat int

ReadLine() public méthode

public ReadLine ( ) : string
Résultat string

ReadToEnd() public méthode

public ReadToEnd ( ) : string
Résultat string