IObjectSpace.IsObjectFitForCriteria(Type, Object, CriteriaOperator) Method

Specifies whether a particular object satisfies the specified criteria.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

bool? IsObjectFitForCriteria(
    Type objectType,
    object obj,
    CriteriaOperator criteria
)
Function IsObjectFitForCriteria(
    objectType As Type,
    obj As Object,
    criteria As CriteriaOperator
) As Boolean?

Parameters

Type Name Description
Type objectType

The type of the object to be tested.

Object obj

A persistent object to be tested.

CriteriaOperator criteria

A CriteriaOperator object representing a criteria to be tested.

Returns

Type Description
Nullable<Boolean>

true if the specified object passed as the obj parameter satisfies the criteria passed as the criteria parameter; otherwise, false.

To learn how to specify a criteria correctly, refer to the Ways to Build Criteria, Criteria Operators, How to: Build Complex Criteria and How to: Build Simple Criteria topics in the XPO documentation.

When implementing the IObjectSpace interface in the BaseObjectSpace class's descendant, you don't have to implement the IsObjectFitForCriteria method. It's implemented by the BaseObjectSpace class. In this method, the expression evaluator provided by the BaseObjectSpace.GetExpressionEvaluator method is used to check whether the specified object fits for the specified criteria. The type passed as the objectType parameter must be assignable from the type of the object passed as the obj parameter.

See Also