Share via


ExpressionEval Object

Ee826078.c++_on(en-US,CS.10).gifEe826078.vb_off(en-US,CS.10).gif

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.

ProgID:   Commerce.ExpressionEvaluator (Externally creatable)
COM Class Name:   ExpressionEval
Type Library Name:   Microsoft Commerce 2000 Expression System Type Library
DLL Name:   exprarch.dll
Threading Model:   Both

The properties of the ExpressionEval object are shown in the following table.

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

This property is read-only.

The methods of the ExpressionEval object are shown in the following table.

Method Description
Connect Establishes communication between the ExpressionEval 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 if it represents a valid expression.

Remarks

Expressions are stored in a database referred to as the Expression Store and accessed through an ExpressionStore object. When it is created, the ExpressionEval 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, Dictionary objects, or other objects that support property access through the IDispatch interface. 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.

See Also

Expression Objects

Expression Recordset

Expression XML Structures

ExpressionStore Object

ProfileObject Object


All rights reserved.