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
-
TokenBuilder
Constructors
TokenBuilder(Char, Char, Int32)
Initializes a new instance of the TokenBuilder class.
public TokenBuilder(char delimiter, char qualifier, int tokens)
Parameters
delimiter
CharThe delimiter used to separate tokens of this instance.
qualifier
CharThe qualifier that surrounds a token.
tokens
Int32The 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
StringThe delimiter used to separate tokens of this instance.
qualifier
StringThe qualifier that surrounds a token.
tokens
Int32The total number of tokens.
Exceptions
- FormatException
The length of
delimiter
is not 1 -or- The length ofqualifier
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
StringThe value to tokenize.
Returns
- TokenBuilder
A reference to this instance.
ToString()
Returns a String that represents this instance.
public override string ToString()