A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Class SimpleExprValidator

Inheritance
System.Object
SimpleExprValidator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Marketing.Validators
Assembly: Mediachase.Commerce.Marketing.Validators.dll
Version: 10.8.0
Syntax
public class SimpleExprValidator : IExpressionValidator

Constructors

SimpleExprValidator()

Initializes a new instance of the SimpleExprValidator class.

Declaration
public SimpleExprValidator()

Methods

Eval(String, String, IDictionary<String, Object>)

Validates the xml string and compares it to existing profile. The xml string must have the following format:

<Profile> <propertyCondition name="Profile" required="true|false"> <Parameter name="operator" value="=|!=|contains|doesNotContain"/> <Parameter name="propertyName" value="propertyName"/> <Parameter name="propertyValue" value="propertyValue"/> </propertyCondition> </Profile>

Condition.Name should correspond to the object in the context dictionary with a same name.

Declaration
public virtual ValidationResult Eval(string key, string expr, IDictionary<string, object> context)
Parameters
Type Name Description
System.String key

The key. Must be a unique key identifying the current expression. It might be used for caching purpose by the engine.

System.String expr

The expression that needs to be evaluated.

System.Collections.Generic.IDictionary<System.String, System.Object> context

The context, which consists of object that will be accessible during expression evaluation.

Returns
Type Description
ValidationResult

Implements