Class JobVariableExpander
- Namespace
- ArcanaDevelopment.adTempus.Shared
- Assembly
- ArcanaDevelopment.adTempus.Shared.dll
Utility class to expand variable reference tokens in a string
public class JobVariableExpander
- Inheritance
-
objectJobVariableExpander
Methods
ApplyFormat(IJobVariable, string)
Formats the value using a type-specific format string
public virtual string ApplyFormat(IJobVariable variable, string formatString)
Parameters
| Name | Type | Description |
|---|---|---|
variable |
IJobVariable | The variable to format |
formatString |
string |
Returns
- string
ExpandTokens(StringBuilder, IJobVariableContainer, out bool)
Expands all variable tokens found in the source string, replacing them with the current value of the referenced variable.
public virtual StringBuilder ExpandTokens(StringBuilder source, IJobVariableContainer container, out bool changesMade)
Parameters
| Name | Type | Description |
|---|---|---|
source |
StringBuilder | |
container |
IJobVariableContainer | |
changesMade |
bool | On return, indicates whether any replacements were made. |
Returns
- StringBuilder
FormatBoolean(IJobVariable, string)
protected virtual string FormatBoolean(IJobVariable variable, string formatString)
Parameters
| Name | Type | Description |
|---|---|---|
variable |
IJobVariable | |
formatString |
string |
Returns
- string
FormatDateTime(IJobVariable, string)
protected virtual string FormatDateTime(IJobVariable variable, string formatString)
Parameters
| Name | Type | Description |
|---|---|---|
variable |
IJobVariable | |
formatString |
string |
Returns
- string
FormatDecimal(IJobVariable, string)
protected virtual string FormatDecimal(IJobVariable variable, string formatString)
Parameters
| Name | Type | Description |
|---|---|---|
variable |
IJobVariable | |
formatString |
string |
Returns
- string
FormatInteger(IJobVariable, string)
protected virtual string FormatInteger(IJobVariable variable, string formatString)
Parameters
| Name | Type | Description |
|---|---|---|
variable |
IJobVariable | |
formatString |
string |
Returns
- string
ValueAsString(IJobVariable)
Returns the value as a string.
protected virtual string ValueAsString(IJobVariable variable)
Parameters
| Name | Type | Description |
|---|---|---|
variable |
IJobVariable |
Returns
- string
Remarks
ValueAsString will return an empty string if the value is null. It will never return a null value.