Class BaseCustomTokenReplace
BaseCustomTokenReplace allows to add multiple sources implementing IPropertyAccess.
Inherited Members
Namespace: DotNetNuke.Services.Tokens
Assembly: DotNetNuke.dll
Syntax
public abstract class BaseCustomTokenReplace : BaseTokenReplace
Constructors
| Improve this Doc View SourceBaseCustomTokenReplace()
Initializes a new instance of the BaseCustomTokenReplace class.
Declaration
public BaseCustomTokenReplace()
Fields
| Improve this Doc View SourcePropertySource
BaseCustomTokenReplace allows to add multiple sources implementing IPropertyAccess.
Declaration
protected Dictionary<string, IPropertyAccess> PropertySource
Field Value
Type | Description |
---|---|
Dictionary<System.String, IPropertyAccess> |
Properties
| Improve this Doc View SourceAccessingUser
Gets or sets the user object representing the currently accessing user (permission).
Declaration
public UserInfo AccessingUser { get; set; }
Property Value
Type | Description |
---|---|
UserInfo | UserInfo object. |
CurrentAccessLevel
Gets or sets the current Access Level controlling access to critical user settings.
Declaration
protected Scope CurrentAccessLevel { get; set; }
Property Value
Type | Description |
---|---|
Scope |
DebugMessages
Gets or sets a value indicating whether if DebugMessages are enabled, unknown Tokens are replaced with Error Messages.
Declaration
public bool DebugMessages { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
If DebugMessages are enabled, unknown Tokens are replaced with Error Messages.
FormatProvider
Gets the Format provider as Culture info from stored language or current culture.
Declaration
protected override CultureInfo FormatProvider { get; }
Property Value
Type | Description |
---|---|
CultureInfo |
Overrides
| Improve this Doc View SourceLanguage
Gets or sets the language to be used, e.g. for date format.
Declaration
public override string Language { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string, representing the locale. |
Overrides
| Improve this Doc View SourceProvider
BaseCustomTokenReplace allows to add multiple sources implementing IPropertyAccess.
Declaration
protected TokenProvider Provider { get; }
Property Value
Type | Description |
---|---|
TokenProvider |
TokenContext
BaseCustomTokenReplace allows to add multiple sources implementing IPropertyAccess.
Declaration
public TokenContext TokenContext { get; set; }
Property Value
Type | Description |
---|---|
TokenContext |
Methods
| Improve this Doc View SourceCacheability(String)
returns cacheability of the passed text regarding all contained tokens.
Declaration
public CacheLevel Cacheability(string sourceText)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceText | the text to parse for tokens to replace. |
Returns
Type | Description |
---|---|
CacheLevel | cacheability level (not - safe - fully). |
Remarks
always check cacheability before caching a module!.
ContainsTokens(String)
Checks for present [Object:Property]
tokens.
Declaration
public bool ContainsTokens(string strSourceText)
Parameters
Type | Name | Description |
---|---|---|
System.String | strSourceText | String with |
Returns
Type | Description |
---|---|
System.Boolean | true if the source text contains tokens, otherwise false. |
replacedTokenValue(String, String, String)
BaseCustomTokenReplace allows to add multiple sources implementing IPropertyAccess.
Declaration
protected override 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 |
Overrides
| Improve this Doc View SourceReplaceTokens(String)
BaseCustomTokenReplace allows to add multiple sources implementing IPropertyAccess.
Declaration
protected override string ReplaceTokens(string sourceText)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceText |
Returns
Type | Description |
---|---|
System.String |