C# Class JsonFx.BuildTools.IO.LineReader

Inheritance: System.IO.TextReader
Datei anzeigen Open project: pocket-playlab/jsonfx-v1 Class Usage Examples

Public Methods

Method Description
Copy ( int start, int end ) : string

Copies a range from the source

LineReader ( string filePath, IEnumerable filters ) : System

Ctor.

LineReader ( string filePath, string source ) : System

Ctor.

LineReader ( string filePath, string source, IEnumerable filters ) : System

Ctor.

Peek ( ) : int

Unfiltered look ahead

PutBack ( ) : void

Backs the current position up one.

Read ( ) : int

Filtered read of the next source char. Counters are incremented.

NewLine sequences (CR/LF, LF, CR) are normalized to LF.

Protected Methods

Method Description
CopyRead ( int &copyPosition ) : int

Read for Copying (doesn't reset line.col counters)

Dispose ( bool disposing ) : void

Free source resources.

Peek ( int lookahead ) : int

Peeks with n chars of lookahead.

Read ( bool filter ) : int

Reads the next char

Private Methods

Method Description
Filter ( char ch ) : int

Filters based upon an internal Trie

NormalizeSpaces ( char ch, int &pos, int &line, int &col ) : char

Normalized CR/CRLF/LF/FF to LF, or all whitespace to SPACE if NormalizeWhiteSpace is true

Method Details

Copy() public method

Copies a range from the source
public Copy ( int start, int end ) : string
start int starting position, inclusive
end int ending position, inclusive
return string

CopyRead() protected method

Read for Copying (doesn't reset line.col counters)
protected CopyRead ( int &copyPosition ) : int
copyPosition int
return int

Dispose() protected method

Free source resources.
protected Dispose ( bool disposing ) : void
disposing bool
return void

LineReader() public method

Ctor.
public LineReader ( string filePath, IEnumerable filters ) : System
filePath string
filters IEnumerable
return System

LineReader() public method

Ctor.
public LineReader ( string filePath, string source ) : System
filePath string
source string
return System

LineReader() public method

Ctor.
public LineReader ( string filePath, string source, IEnumerable filters ) : System
filePath string
source string
filters IEnumerable
return System

Peek() public method

Unfiltered look ahead
public Peek ( ) : int
return int

Peek() protected method

Peeks with n chars of lookahead.
protected Peek ( int lookahead ) : int
lookahead int
return int

PutBack() public method

Backs the current position up one.
public PutBack ( ) : void
return void

Read() public method

Filtered read of the next source char. Counters are incremented.
NewLine sequences (CR/LF, LF, CR) are normalized to LF.
public Read ( ) : int
return int

Read() protected method

Reads the next char
protected Read ( bool filter ) : int
filter bool if filtering
return int