Provides default algorithm for cutting and formatting tokens
Default constructor
public Void TokenFunction()
Initializes a new instance of TokenFunction.
public Void TokenFunction(start, end)
Name | Type | Summary |
---|---|---|
start | String | |
end | String |
Type | Summary |
---|---|
ArgumentNullOrEmptyException | Thrown when any of the arguments are null or empty. |
Search for token functions in the message and replaces all with the formatted values from source the dictionary.
public Void Format(builder, source)
Name | Type | Summary |
---|---|---|
builder | StringBuilder | |
source | IDictionary<String, Object> |
Replaces the token template with the corresponding value from the object.
protected String FormatToken(tokenTemplate, source)
Name | Type | Summary |
---|---|---|
tokenTemplate | String | |
source | IDictionary<String, Object> |
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.
protected String GetInnerTemplate(startPos, message)
Name | Type | Summary |
---|---|---|
startPos | Int32 | |
message | String |
In this document