Click or drag to resize
MacroResolverResolveMacroExpression Method (String, Boolean, Boolean, String)
Resolves the data macro expression (expects expression without {% %} brackets). Use RemoveDataMacroBrackets(String) method to remove brackets if needed.

Namespace: CMS.MacroEngine
Assembly: CMS.MacroEngine (in CMS.MacroEngine.dll) Version: 11.0.0
Syntax
C#
public EvaluationResult ResolveMacroExpression(
	string expression,
	bool keepObjectsAsResult = false,
	bool skipSecurityCheck = false,
	string type = "%"
)

Parameters

expression
Type: SystemString
Macro expression without {% %} brackets
keepObjectsAsResult (Optional)
Type: SystemBoolean
If true, when the result is InfoObject it is the result, if false, object is resolved as its displayname (for backward compatibility)
skipSecurityCheck (Optional)
Type: SystemBoolean
If true, security check is not performed
type (Optional)
Type: SystemString
Type of the expression (? or $ or %)

Return Value

Type: EvaluationResult
Remarks
Returns null when macro evaluation throws exception
See Also