Click or drag to resize
MacroRuleTreeGetRuleText Method (String, Boolean, Boolean, FuncObject, Object)
Returns rule as a human readable sentence. If the expression is Rule(...) method than it uses XML for the rule, otherwise returns expression as it is.

Namespace: CMS.MacroEngine
Assembly: CMS.MacroEngine (in CMS.MacroEngine.dll) Version: 11.0.0
Syntax
C#
public static string GetRuleText(
	string ruleExpression,
	bool includingMarkup = true,
	bool throwOnError = false,
	Func<Object, Object> valueTransformation = null
)

Parameters

ruleExpression
Type: SystemString
Rule expression to render.
includingMarkup (Optional)
Type: SystemBoolean
If true, rule is formatted using HTML markup
throwOnError (Optional)
Type: SystemBoolean
If true, the exception is thrown in case of error in parsing the expression
valueTransformation (Optional)
Type: SystemFuncObject, Object
Transformation function which is used to further modify the displayed parameter value (used for example to add TimeZones support for date time parameter values)

Return Value

Type: String
See Also