Class BaseTokenReplace
The BaseTokenReplace class provides the tokenization of tokens formatted [object:property] or [object:property|format|ifEmpty] or [custom:no] within a string with the appropriate current property/custom values.
Namespace: DotNetNuke.Services.Tokens
Assembly: DotNetNuke.dll
Syntax
public abstract class BaseTokenReplace : object
Fields
| Improve this Doc View SourceObjectLessToken
The BaseTokenReplace class provides the tokenization of tokens formatted [object:property] or [object:property|format|ifEmpty] or [custom:no] within a string with the appropriate current property/custom values.
Declaration
protected const string ObjectLessToken = null
Field Value
Type | Description |
---|---|
System.String |
Properties
| Improve this Doc View SourceFormatProvider
Gets the Format provider as Culture info from stored language or current culture.
Declaration
protected virtual CultureInfo FormatProvider { get; }
Property Value
Type | Description |
---|---|
CultureInfo | An CultureInfo. |
Language
Gets or sets /sets the language to be used, e.g. for date format.
Declaration
public virtual string Language { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string, representing the locale. |
TokenizerRegex
Gets the Regular expression for the token to be replaced.
Declaration
protected Regex TokenizerRegex { get; }
Property Value
Type | Description |
---|---|
Regex | A regular Expression. |
UseObjectLessExpression
The BaseTokenReplace class provides the tokenization of tokens formatted [object:property] or [object:property|format|ifEmpty] or [custom:no] within a string with the appropriate current property/custom values.
Declaration
protected bool UseObjectLessExpression { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourcereplacedTokenValue(String, String, String)
The BaseTokenReplace class provides the tokenization of tokens formatted [object:property] or [object:property|format|ifEmpty] or [custom:no] within a string with the appropriate current property/custom values.
Declaration
protected abstract string replacedTokenValue(string objectName, string propertyName, string format)
Parameters
Type | Name | Description |
---|---|---|
System.String | objectName | |
System.String | propertyName | |
System.String | format |
Returns
Type | Description |
---|---|
System.String |
ReplaceTokens(String)
The BaseTokenReplace class provides the tokenization of tokens formatted [object:property] or [object:property|format|ifEmpty] or [custom:no] within a string with the appropriate current property/custom values.
Declaration
protected virtual string ReplaceTokens(string sourceText)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceText |
Returns
Type | Description |
---|---|
System.String |