Click or drag to resize

IRuleApiEval Method (String, IDictionaryString, Object)

Evaluate a rule with parameters.

Namespace:  Casewhere.Runtime.DSL.Api
Assembly:  Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.1.0
Syntax
C#
bool Eval(
	string ruleName,
	IDictionary<string, Object> parameters
)

Parameters

ruleName
Type: SystemString
Name of the rule.
parameters
Type: System.Collections.GenericIDictionaryString, Object
Parameters to evaluate condition in rule.

Return Value

Type: Boolean
Value return from rule expression
Examples
var ruleApi = ctx.Use<IRuleApi>();
var parameters = new Dictionary<string, object>();
parameters.Add("Username","tester");
var passed = ruleApi.Eval("Demo rule vs parameter", parameters);
See Also