Skip to main content
.NET 8.0+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IObjectSpace.IsObjectFitForCriteria(Object, CriteriaOperator) Method

Specifies whether the specified object satisfies the specified criteria.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

bool? IsObjectFitForCriteria(
    object obj,
    CriteriaOperator criteria
)

#Parameters

Name Type Description
obj Object

A persistent object to be tested.

criteria CriteriaOperator

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. null (Nothing in VB) if the method could not return a value due to an exception.

#Remarks

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.

See Also