Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

BaseCacheAdvice.EvalCondition Method

Evaluates a SpEL expression as a boolean value.

[Visual Basic]
Protected Shared Sub EvalCondition( _
   ByVal condition As String, _
   ByVal conditionExpression As IExpression, _
   ByVal context As Object, _
   ByVal variables As IDictionary _
)
[C#]
protected static bool EvalCondition(
   string condition,
   IExpression conditionExpression,
   object context,
   IDictionary variables
);

Parameters

condition
The expression string that should be evaluated.
conditionExpression
The SpEL expression instance that should be evaluated.
context
The object to evaluate expression against.
variables
The expression variables dictionary.

Return Value

The evaluated boolean.

Exceptions

Exception Type Condition
InvalidOperationException If the SpEL expression could not be successfuly resolved to a boolean.

See Also

BaseCacheAdvice Class | Spring.Aspects.Cache Namespace