Click or drag to resize

IInterpreterInterpret Method

Interpret the macros in the specified text.

Namespace:  AskiaPortalCmn.Common
Assembly:  AskiaPortalCmn (in AskiaPortalCmn.dll) Version: 1.7.0-build068
Syntax
string Interpret(
	string text
)

Parameters

text
Type: SystemString
Text to interpret.

Return Value

Type: String
Return the interpreted text.
Examples

Example of usage

var user = UserFactory.FindById(context, 2);
if (user == null)
{
    return;
}

var interpreter = InterpreterFactory.GetDefault(context, user);
var text = interpreter.Interpret("Hello {{User.FirstName}} {{User.LastName}}");
Console.WriteLine(text);
// For `John Doe` user, this code produce:
// "Hello John Doe"
See Also