C# Class HttpServer.Tools.StringReader

Used to read from a string object.
Inheritance: ITextReader
Afficher le fichier Open project: NyxStudios/HttpServer Class Usage Examples

Méthodes publiques

Méthode Description
Assign ( object buffer ) : void

Assign a new buffer

buffer MUST be of type string.

Assign ( object buffer, int offset, int count ) : void

Assign a new buffer

buffer MUST be of type string.

Consume ( ) : void

Consume current character.

ConsumeWhiteSpaces ( ) : void

Consumes horizontal white spaces (space and tab).

ConsumeWhiteSpaces ( char extraCharacter ) : void

Consume horizontal white spaces and the specified character.

Contains ( char ch ) : bool

Checks if one of the remaining bytes are a specified character.

Read ( ) : char

Read a character.

ReadLine ( ) : string

Get a text line.

Will merge multiline headers.

ReadQuotedString ( ) : string

Read quoted string

ReadToEnd ( ) : string

Read until end of string, or to one of the delimiters are found.

Will not consume the delimiter.

ReadToEnd ( char delimiter ) : string

Read to end of buffer, or until specified delimiter is found.

ReadToEnd ( string delimiters ) : string

Read until end of string, or to one of the delimiters are found.

ReadUntil ( char delimiter ) : string

Will read until specified delimiter is found.

Will trim away spaces and tabs from the end. Will not consume the delimiter.

ReadUntil ( string delimiters ) : string

Read until one of the delimiters are found.

Will not consume the delimiter.

ReadWord ( ) : string

Read until a horizontal white space occurs (or end, or end of line).

StringReader ( ) : System

Initializes a new instance of the StringReader class.

StringReader ( string buffer ) : System

Initializes a new instance of the StringReader class.

Private Methods

Méthode Description
GetString ( int startIndex, int endIndex ) : string
GetString ( int startIndex, int endIndex, bool trimEnd ) : string

Method Details

Assign() public méthode

Assign a new buffer
buffer MUST be of type string.
buffer needs to be of type string
public Assign ( object buffer ) : void
buffer object Buffer to process
Résultat void

Assign() public méthode

Assign a new buffer
buffer MUST be of type string.
buffer needs to be of type string
public Assign ( object buffer, int offset, int count ) : void
buffer object Buffer to process.
offset int Where to start process buffer
count int Buffer length
Résultat void

Consume() public méthode

Consume current character.
public Consume ( ) : void
Résultat void

ConsumeWhiteSpaces() public méthode

Consumes horizontal white spaces (space and tab).
public ConsumeWhiteSpaces ( ) : void
Résultat void

ConsumeWhiteSpaces() public méthode

Consume horizontal white spaces and the specified character.
public ConsumeWhiteSpaces ( char extraCharacter ) : void
extraCharacter char Extra character to consume
Résultat void

Contains() public méthode

Checks if one of the remaining bytes are a specified character.
public Contains ( char ch ) : bool
ch char Character to find.
Résultat bool

Read() public méthode

Read a character.
public Read ( ) : char
Résultat char

ReadLine() public méthode

Get a text line.
Will merge multiline headers.
public ReadLine ( ) : string
Résultat string

ReadQuotedString() public méthode

Read quoted string
public ReadQuotedString ( ) : string
Résultat string

ReadToEnd() public méthode

Read until end of string, or to one of the delimiters are found.
Will not consume the delimiter.
public ReadToEnd ( ) : string
Résultat string

ReadToEnd() public méthode

Read to end of buffer, or until specified delimiter is found.
InvalidOperationException.
public ReadToEnd ( char delimiter ) : string
delimiter char Delimiter to find.
Résultat string

ReadToEnd() public méthode

Read until end of string, or to one of the delimiters are found.
InvalidOperationException.
public ReadToEnd ( string delimiters ) : string
delimiters string characters to stop at
Résultat string

ReadUntil() public méthode

Will read until specified delimiter is found.
Will trim away spaces and tabs from the end. Will not consume the delimiter.
InvalidOperationException.
public ReadUntil ( char delimiter ) : string
delimiter char Character to stop at.
Résultat string

ReadUntil() public méthode

Read until one of the delimiters are found.
Will not consume the delimiter.
InvalidOperationException.
public ReadUntil ( string delimiters ) : string
delimiters string characters to stop at
Résultat string

ReadWord() public méthode

Read until a horizontal white space occurs (or end, or end of line).
public ReadWord ( ) : string
Résultat string

StringReader() public méthode

Initializes a new instance of the StringReader class.
public StringReader ( ) : System
Résultat System

StringReader() public méthode

Initializes a new instance of the StringReader class.
public StringReader ( string buffer ) : System
buffer string Buffer to process.
Résultat System