Table of Contents

Class TokenBuilder

Namespace
Cuemon.Data
Assembly
Cuemon.Data.dll

Represents a mutable string of characters optimized for tokens. This class cannot be inherited.

public sealed class TokenBuilder
Inheritance
Object
TokenBuilder

Constructors

TokenBuilder(Char, Char, Int32)

Initializes a new instance of the TokenBuilder class.

public TokenBuilder(char delimiter, char qualifier, int tokens)

Parameters

delimiter Char

The delimiter used to separate tokens of this instance.

qualifier Char

The qualifier that surrounds a token.

tokens Int32

The total number of tokens.

TokenBuilder(String, String, Int32)

Initializes a new instance of the TokenBuilder class.

public TokenBuilder(string delimiter, string qualifier, int tokens)

Parameters

delimiter String

The delimiter used to separate tokens of this instance.

qualifier String

The qualifier that surrounds a token.

tokens Int32

The total number of tokens.

Exceptions

System.FormatException

The length of delimiter is not 1 -or- The length of qualifier is not 1.

Properties

Delimiter

Gets the delimiter used to separate tokens of this builder.

public char Delimiter { get; }

Property Value

Char

The delimiter used to separate tokens of this builder.

IsValid

Returns a value indicating whether the current state of this builder is valid.

public bool IsValid { get; }

Property Value

Boolean

true if the current state of this builder is valid; otherwise, false.

Qualifier

Gets the qualifier that surrounds a token of this builder.

public char Qualifier { get; }

Property Value

Char

The qualifier that surrounds a token of this builder.

Tokens

Gets the total number of tokens this builder represents.

public int Tokens { get; }

Property Value

Int32

The total number of tokens this builder represents.

Methods

Append(String)

Appends the specified value to this builder.

public TokenBuilder Append(string value)

Parameters

value String

The value to tokenize.

Returns

TokenBuilder

A reference to this instance.

ToString()

Returns a System.String that represents this instance.

public override string ToString()

Returns

String

A System.String that represents this instance.