Share via


ExpressionEvaluator Class (PIA)

Use this object to evaluate one or more expressions against a specified context. In addition, use this object to parse and evaluate user-defined expressions written as Extensible Markup Language (XML) fragments.

Methods

Method Description
Connect Establishes communication between the ExpressionEvaluator object and an expression store.
CreateEvalContext Creates a new ExprEvalContext object in the context cache.
Eval Evaluates an expression.
EvalInContext Evaluates an expression in a context previously loaded into the context cache.
EvalXML Evaluates the specified XML text as an expression.
FlushAll Removes all expressions from the expression cache.
FlushExpr Removes the specified expression from the expression cache.
LoadAll Reads all expressions from the expression store and loads them into the expression cache.
LoadExpr Reads the specified expression from the expression store and loads it into the expression cache.
ParseXML Parses the specified XML text to determine whether it represents a valid expression.

Properties

Property Type Description
ExprCount Integer Retrieves the number of expressions loaded into the expression cache.

This property is read-only.

Remarks

Expressions are stored in a database referred to as the Expression Store and accessed through an ExpressionStore object. When it is created, the ExpressionEvaluator object initializes an expression cache and a context cache. Expressions must be compiled and loaded into the expression cache before being evaluated. To improve evaluation performance, use the LoadExpr or LoadAll method to preload expressions into the expression cache.

An expression is evaluated against data contained in a set of profiles. The profiles may be ProfileObject objects, or Dictionary objects. The set of profiles is referred to as an evaluation context. If an evaluation context will be used across multiple expressions, create a stored context in the context cache using the CreateEvalContext method to increase efficiency.

The Connect method must be called before loading or evaluating expressions.

Requirements

Namespace: Microsoft.CommerceServer.Interop.Targeting

Platforms: Windows 2000, Windows Server 2003

Assembly: exprarchlib (in exprarchlib.dll)

See Also

Expression XML Structures

ExpressionStore Object

ProfileObject Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.