C# Class SmtpServer.Protocol.Text.TokenEnumerator

Afficher le fichier Open project: cosullivan/SmtpServer Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
Checkpoint ( ) : ITokenEnumeratorCheckpoint

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

TokenEnumerator ( ) : System

Constructor.

Method Details

AsText() public méthode

Returns a text string which is the combined tokens.
public AsText ( ) : string
Résultat string

Peek() public méthode

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

Take() public méthode

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

TakeWhile() public méthode

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.
Résultat void

TakeWhile() public méthode

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.
Résultat void

TokenEnumerator() public méthode

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

TokenEnumerator() public méthode

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