EvaluateInContext Method
Evaluates the specified expression, using the profiles contained in the EvaluationContextHandle object.
Namespace: Microsoft.CommerceServer.Runtime.Targeting
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Function EvaluateInContext ( _
expressionID As Integer, _
evaluationContextHandle As Object _
) As ExpressionEvaluator..::.ExpressionResult
'Usage
Dim instance As ExpressionEvaluator
Dim expressionID As Integer
Dim evaluationContextHandle As Object
Dim returnValue As ExpressionEvaluator..::.ExpressionResult
returnValue = instance.EvaluateInContext(expressionID, _
evaluationContextHandle)
public ExpressionEvaluator..::.ExpressionResult EvaluateInContext(
int expressionID,
Object evaluationContextHandle
)
public:
ExpressionEvaluator..::.ExpressionResult EvaluateInContext(
int expressionID,
Object^ evaluationContextHandle
)
public function EvaluateInContext(
expressionID : int,
evaluationContextHandle : Object
) : ExpressionEvaluator..::.ExpressionResult
Parameters
- expressionID
Type: System..::.Int32
The identifier of the expression to be evaluated. Must be greater than or equal to 0.
- evaluationContextHandle
Type: System..::.Object
EvaluationContext object created by the CreateEvaluationContextHandle method.
Return Value
Type: Microsoft.CommerceServer.Runtime.Targeting..::.ExpressionEvaluator..::.ExpressionResult
ExpressionEvaluator..::.ExpressionResult enumerator
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The evaluationContext argument was passed as nullNothingnullptra null reference (Nothing in Visual Basic). |
ArgumentOutOfRangeException | The expressionID argument is less than one. |
CommerceTargetingException | All other failures. |
Remarks
Evaluates the specified expression, using the profiles contained in the EvaluationContextHandle object.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.