TokenFunction

Provides default algorithm for cutting and formatting tokens

Namespace:
Inetdev.Text
Type:
Class
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
No
Inherits from:
System.Object

Constructors

TokenFunction

Default constructor

Signature:
public Void TokenFunction()

TokenFunction

Initializes a new instance of TokenFunction.

Signature:
public Void TokenFunction(start, end)
Parameters
Name Type Summary
start String
end String
Exceptions
Type Summary
ArgumentNullOrEmptyException Thrown when any of the arguments are null or empty.

Methods

Format

Search for token functions in the message and replaces all with the formatted values from source the dictionary.

Signature:
public Void Format(builder, source)
Parameters
Name Type Summary
builder StringBuilder
source IDictionary<String, Object>

FormatToken

Replaces the token template with the corresponding value from the object.

Signature:
protected String FormatToken(tokenTemplate, source)
Parameters
Name Type Summary
tokenTemplate String
source IDictionary<String, Object>

GetInnerTemplate

Gets the inner part of the template between the next start and end delimiter. The message expected is supposed to contains the start and end delimiter.

Signature:
protected String GetInnerTemplate(startPos, message)
Parameters
Name Type Summary
startPos Int32
message String