C# Class SmtpServer.Protocol.Text.TokenEnumerator

Mostra file Open project: cosullivan/SmtpServer Class Usage Examples

Public Methods

Method Description
AsText ( ) : string

Returns a text string which is the combined tokens.

Peek ( int count ) : Token

Peek at a token in the stream.

Take ( int count = 1 ) : Token

Take the given number of tokens.

TakeWhile ( bool>.Func predicate ) : void

Take tokens in the stream while the given predicate is true.

TakeWhile ( TokenKind kind ) : void

Take tokens in the stream while the token kind is the same as the supplied kind.

TokenEnumerator ( IEnumerable tokenizer ) : System

Constructor.

TokenEnumerator ( TokenReader tokenReader ) : System

Constructor.

Private Methods

Method Description
Checkpoint ( ) : ITokenEnumeratorCheckpoint

Create a checkpoint on the enumerator that can be rolled back to.

TokenEnumerator ( ) : System

Constructor.

Method Details

AsText() public method

Returns a text string which is the combined tokens.
public AsText ( ) : string
return string

Peek() public method

Peek at a token in the stream.
public Peek ( int count ) : Token
count int The number of tokens to look ahead.
return Token

Take() public method

Take the given number of tokens.
public Take ( int count = 1 ) : Token
count int The number of tokens to consume.
return Token

TakeWhile() public method

Take tokens in the stream while the given predicate is true.
public TakeWhile ( bool>.Func predicate ) : void
predicate bool>.Func The predicate to use for evaluating whether or not to consume a token.
return void

TakeWhile() public method

Take tokens in the stream while the token kind is the same as the supplied kind.
public TakeWhile ( TokenKind kind ) : void
kind TokenKind The token kind to test against to determine whether the token should be consumed.
return void

TokenEnumerator() public method

Constructor.
public TokenEnumerator ( IEnumerable tokenizer ) : System
tokenizer IEnumerable The tokenizer to retrieve the tokens from.
return System

TokenEnumerator() public method

Constructor.
public TokenEnumerator ( TokenReader tokenReader ) : System
tokenReader TokenReader The token reader to pull the tokens from.
return System