Version

Evaluate Method

Called to evaluate the specified comparison operator. This method can also be used to convert the comparison values using custom logic and let the default built-in evaluation logic handle the actual comparison.
Syntax
'Declaration
 
Function Evaluate( _
   ByVal comparisonOperator As ComparisonOperator, _
   ByRef lhs As Object, _
   ByRef rhs As Object, _
   ByVal context As ConditionEvaluationContext _
) As Nullable(Of Boolean)

Parameters

comparisonOperator
Comparison operator.
lhs
Value on the left hand side of the operator. You can set this by-ref parameter to its converted form and return null from the method to have the default built-in logic perform the evaluation of the operator using the converted value.
rhs
Value on the right hand side of the operator. Similarly to 'lhs' parameter, you can also set this by-ref parameter to its converted form.
context
Evaluation context. You can use the context's ConditionEvaluationContext.SetUserCache method to store any cached value for retrival in successive calls via the context's ConditionEvaluationContext.GetUserCache method.

Return Value

Returns true if the comparison of the specified values using specified operator evaluates to true. Returns false if the comparison fails. Returns null if you want to let the default built-in logic to handle evaluation.
Remarks

This method lets you evaluate the comparison operator. You can choose to evaluate specific operators only and let the default logic handle the evaluation of other operators by returning null. Another use for this method is to provide custom conversion logic for converting the lhs and rhs before the default built-in implementation evaluates the comparison. To do that you would set the 'lhs' and 'rhs' ref parameters to their converted representations and return null from the method. The default built-in evaluation logic will use the converted values.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also