C# Класс MoreInternals.Parser.ParserStream

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
DirectPeek int
DirectRead int

Открытые методы

Метод Описание
Advance ( ) : void

Advance the stream by one character.

AdvancePast ( string needle, bool requireFind = true ) : void

Advance the stream until needle is encountered, then advance past it. If requireFind = true (which is the default) this method throws an error if needle can not be found.

AdvancePastWhiteSpace ( ) : void

Like AdvancePast, but for all whitespace characters. Does not error if not white space is found.

Dispose ( ) : void
HasMore ( ) : bool

Returns true if there are more characters to be read from the stream.

ParserStream ( TextReader wrapped ) : System
Peek ( ) : char

Looks at the next character in the stream

PushBack ( IEnumerable pushBack ) : void

Puts these characters back into the stream

Read ( ) : char

Read a single character from the stream.

ScanUntil ( StringBuilder buffer ) : char?

Advances the stream until one of needles is found, placing everything *before* needle into buffer. Advances past the needle as well. If none of the needles are found, an error is encountered. needles appear immediately after \ (the escape char) will not be considered matching.

ScanUntilWithNesting ( StringBuilder buffer, char needle, bool requireFound = true ) : void

Advances until c is found, placing everything before needle into buffer. Advances past needle as well. Differs from ScanUtil in that needles between quotes and ()'s are not counted as terminating. needles appear immediately after \ (the escape char) will not be considered matching.

WhichNextInsensitive ( StringBuilder rejected ) : string

Advances the stream until one of the strings passed in is encountered (using a case insensitive compare). Returns which of strings was encountered.

Приватные методы

Метод Описание
DirectPeek ( ) : int
DirectRead ( ) : int

Описание методов

Advance() публичный Метод

Advance the stream by one character.
public Advance ( ) : void
Результат void

AdvancePast() публичный Метод

Advance the stream until needle is encountered, then advance past it. If requireFind = true (which is the default) this method throws an error if needle can not be found.
public AdvancePast ( string needle, bool requireFind = true ) : void
needle string
requireFind bool
Результат void

AdvancePastWhiteSpace() публичный Метод

Like AdvancePast, but for all whitespace characters. Does not error if not white space is found.
public AdvancePastWhiteSpace ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

HasMore() публичный Метод

Returns true if there are more characters to be read from the stream.
public HasMore ( ) : bool
Результат bool

ParserStream() публичный Метод

public ParserStream ( TextReader wrapped ) : System
wrapped TextReader
Результат System

Peek() публичный Метод

Looks at the next character in the stream
public Peek ( ) : char
Результат char

PushBack() публичный Метод

Puts these characters back into the stream
public PushBack ( IEnumerable pushBack ) : void
pushBack IEnumerable
Результат void

Read() публичный Метод

Read a single character from the stream.
public Read ( ) : char
Результат char

ScanUntil() публичный Метод

Advances the stream until one of needles is found, placing everything *before* needle into buffer. Advances past the needle as well. If none of the needles are found, an error is encountered. needles appear immediately after \ (the escape char) will not be considered matching.
public ScanUntil ( StringBuilder buffer ) : char?
buffer StringBuilder
Результат char?

ScanUntilWithNesting() публичный Метод

Advances until c is found, placing everything before needle into buffer. Advances past needle as well. Differs from ScanUtil in that needles between quotes and ()'s are not counted as terminating. needles appear immediately after \ (the escape char) will not be considered matching.
public ScanUntilWithNesting ( StringBuilder buffer, char needle, bool requireFound = true ) : void
buffer StringBuilder
needle char
requireFound bool
Результат void

WhichNextInsensitive() публичный Метод

Advances the stream until one of the strings passed in is encountered (using a case insensitive compare). Returns which of strings was encountered.
public WhichNextInsensitive ( StringBuilder rejected ) : string
rejected StringBuilder
Результат string