Class Tokenizer

Divides the string into tokens.

Inheritance
System.Object
Tokenizer
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Marketing.Validators.Providers.DomParser
Assembly: Mediachase.Commerce.Marketing.Validators.dll
Version: 10.8.0
Syntax
public class Tokenizer

Constructors

Tokenizer(String)

A tokenizer is always constructed on a single string. Create one tokenizer per string.

Declaration
public Tokenizer(string s)
Parameters
Type Name Description
System.String s

string to tokenize

Properties

Current

Allows access to the token most recently parsed.

Declaration
public Token Current { get; }
Property Value
Type Description
Token

IsChar

Is the current character a letter or underscore?

Declaration
public bool IsChar { get; }
Property Value
Type Description
System.Boolean

IsComma

Is the current character a comma?

Declaration
public bool IsComma { get; }
Property Value
Type Description
System.Boolean

IsDot

Is the current character a dot (".")?

Declaration
public bool IsDot { get; }
Property Value
Type Description
System.Boolean

IsInvalid

Indicates that there are no more characters in the string and tokenizer is finished.

Declaration
public bool IsInvalid { get; }
Property Value
Type Description
System.Boolean

IsNumber

Is the current character a number?

Declaration
public bool IsNumber { get; }
Property Value
Type Description
System.Boolean

IsOperator

Is the current character an operator?

Declaration
public bool IsOperator { get; }
Property Value
Type Description
System.Boolean

IsSpace

Is the current character a whitespace character?

Declaration
public bool IsSpace { get; }
Property Value
Type Description
System.Boolean

Methods

GetNextToken()

Gets the next token in the string. Reads as many characters as necessary to retrieve that token.

Declaration
public Token GetNextToken()
Returns
Type Description
Token

next token