Click or drag to resize

IConsoleTemplateEvaluateEnableRule Method

Evaluate the javascript "EnableRule" expression against the main renderer's mapper, evaluate the result as javascript, and return the result as true/false. If an error occurs while evaluating the expression, then a message will be returned in errorMessage and the function will return false. Note that if the mapper has no records then the expression is not evaluated and false is always returned.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
bool EvaluateEnableRule(
	string expression,
	EnableRuleOptions options,
	Object item,
	out string errorMessage
)

Parameters

expression
Type: SystemString
The EnableRule expression to evaluate.
options
Type: NetQuarryEnableRuleOptions
Options for handling the EnableRule.
item
Type: SystemObject
The item against which the EnableRule is being applied. Provided for debugging purposes.
errorMessage
Type: SystemString
An error message, null/empty if no error occurs evaluating the expression, else the message.

Return Value

Type: Boolean
True if the expression is null/empty or, when resolved against the primary renderer's mapper, is a javascript evaluates to true.
See Also