C# 클래스 MoreInternals.Parser.ParserStream

상속: IDisposable
파일 보기 프로젝트 열기: kevin-montrose/More 1 사용 예제들

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