Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

XPObjectSpace.FindObject(Type, CriteriaOperator, Boolean) Method

Searches for the first object which matches the specified criteria.

Namespace: DevExpress.ExpressApp.Xpo

Assembly: DevExpress.ExpressApp.Xpo.v19.2.dll

Declaration

public override object FindObject(
    Type objectType,
    CriteriaOperator criteria,
    bool inTransaction
)

Parameters

Name Type Description
objectType Type

A Type object which is the type of objects to search for.

criteria CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator descendant which is the criteria for matching persistent objects.

inTransaction Boolean

true if all objects (in the database and retrieved) are processed by the specified criteria; otherwise, false.

Returns

Type Description
Object

An object which is the first persistent object which matches the specified criteria. null (Nothing in Visual Basic) if there is no persistent object which matches the criteria.

Remarks

This method searches for an object, both if the specified object type is a class and if the specified object type is an interface.

Persistent objects that are marked for deletion are not included in the search.

See Also