C# Class CsQuery.Implementation.CombinedTextReader

Creates a virtual TextReader from several other streams.
Inheritance: TextReader
显示文件 Open project: prepare/HTML-Renderer Class Usage Examples

Protected Properties

Property Type Description
Readers TextReader[]

Private Properties

Property Type Description
NextReader bool

Public Methods

Method Description
Close ( ) : void

Closes the T:System.IO.TextReader and releases any system resources associated with the TextReader.

CombinedTextReader ( ) : System

Create a new virtual TextReader by combining, in sequence, the streams provided as parameters to the constructor

CreateObjRef ( Type requestedType ) : System.Runtime.Remoting.ObjRef

Creates object reference. (Overridden because it's implemented by the base class and we want to be sure that anything trying to use this will fail).

Equals ( object obj ) : bool

Tests if this object is considered equal to another.

GetHashCode ( ) : int

Returns a hash code for this object.

InitializeLifetimeService ( ) : object

Initializes the lifetime service. (Overridden because it's implemented by the base class and we want to be sure that anything trying to use this will fail).

Peek ( ) : int

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 input stream.

Read ( ) : int

Reads the next character from the input stream and advances the character position by one character.

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

Reads a maximum of count characters from the current stream and writes the data to buffer, beginning at index.

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

Reads a maximum of count characters from the current stream, and writes the data to buffer, beginning at index.

ReadLine ( ) : string

Reads a line of characters from the current stream and returns the data as a string. Note: this method will not combine data from two boundary streams into a single line; the end of a stream is always the end of a line. This could result in stream corruption (e.g. the addition of newlines between streams) when using this method.

ReadToEnd ( ) : string

Reads all characters from the current position to the end of the TextReader and returns them as one string.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the T:System.IO.TextReader and optionally releases the managed resources.

Private Methods

Method Description
NextReader ( ) : bool

Advance to the next reader

Method Details

Close() public method

Closes the T:System.IO.TextReader and releases any system resources associated with the TextReader.
public Close ( ) : void
return void

CombinedTextReader() public method

Create a new virtual TextReader by combining, in sequence, the streams provided as parameters to the constructor
public CombinedTextReader ( ) : System
return System

CreateObjRef() public method

Creates object reference. (Overridden because it's implemented by the base class and we want to be sure that anything trying to use this will fail).
/// Thrown when the requested operation is unimplemented. ///
public CreateObjRef ( Type requestedType ) : System.Runtime.Remoting.ObjRef
requestedType System.Type /// Type of the requested. ///
return System.Runtime.Remoting.ObjRef

Dispose() protected method

Releases the unmanaged resources used by the T:System.IO.TextReader and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool /// true to release both managed and unmanaged resources; false to release only unmanaged /// resources. ///
return void

Equals() public method

Tests if this object is considered equal to another.
public Equals ( object obj ) : bool
obj object /// The object to compare to this object. ///
return bool

GetHashCode() public method

Returns a hash code for this object.
public GetHashCode ( ) : int
return int

InitializeLifetimeService() public method

Initializes the lifetime service. (Overridden because it's implemented by the base class and we want to be sure that anything trying to use this will fail).
/// Thrown when the requested operation is unimplemented. ///
public InitializeLifetimeService ( ) : object
return object

Peek() public method

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 input stream.
public Peek ( ) : int
return int

Read() public method

Reads the next character from the input stream and advances the character position by one character.
public Read ( ) : int
return int

Read() public method

Reads a maximum of count characters from the current stream and writes the data to buffer, beginning at index.
/// is null. /// /// The buffer length minus is less than . /// /// or is negative. /// /// The is closed. /// /// An I/O error occurs. ///
public Read ( char buffer, int index, int count ) : int
buffer char /// When this method returns, contains the specified character array with the values between /// and ( + - 1) /// replaced by the characters read from the current source. ///
index int /// The position in at which to begin writing. ///
count int /// The maximum number of characters to read. If the end of the stream is reached before /// of characters is read into , the current /// method returns. ///
return int

ReadBlock() public method

Reads a maximum of count characters from the current stream, and writes the data to buffer, beginning at index.
public ReadBlock ( char buffer, int index, int count ) : int
buffer char /// When this method returns, this parameter contains the specified character array with the /// values between and ( + /// -1) replaced by the characters read from the current source. ///
index int /// The position in at which to begin writing. ///
count int /// The maximum number of characters to read. ///
return int

ReadLine() public method

Reads a line of characters from the current stream and returns the data as a string. Note: this method will not combine data from two boundary streams into a single line; the end of a stream is always the end of a line. This could result in stream corruption (e.g. the addition of newlines between streams) when using this method.
public ReadLine ( ) : string
return string

ReadToEnd() public method

Reads all characters from the current position to the end of the TextReader and returns them as one string.
public ReadToEnd ( ) : string
return string

Property Details

Readers protected_oe property

The readers.
protected TextReader[] Readers
return TextReader[]