Table of Contents

Interface IObjectLayerAsync

Namespace
DevExpress.Xpo
Assembly
DevExpress.Xpo.v24.1.dll

Declares asynchronous methods for an object access layer.

public interface IObjectLayerAsync

Properties

CanLoadCollectionObjectsAsynchronously

When implemented by a class, indicates if an object layer can call the IObjectLayerAsync.LoadCollectionObjectsAsync method to asynchronously load collection properties.

bool CanLoadCollectionObjectsAsynchronously { get; }

Property Value

bool

true if collections can be asynchronously loaded via an object layer’s IObjectLayerAsync.LoadCollectionObjectsAsync method call; otherwise, false.

Methods

CommitChangesAsync(Session, ICollection, ICollection, CancellationToken)

Asynchronously commits object changes made in a specified session and notifies upon completion.

Task CommitChangesAsync(Session session, ICollection fullListForDelete, ICollection completeListForSave, CancellationToken cancellationToken = default)

Parameters

session Session

A Session with pending object changes.

fullListForDelete ICollection

A collection of persistent objects to be deleted.

completeListForSave ICollection

A collection of persistent objects to be saved.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Returns

Task

A Task that commits specified object changes.

CreateObjectTypeAsync(XPObjectType, CancellationToken)

When implemented by a class, asynchronously creates an XPObjectType record.

Task CreateObjectTypeAsync(XPObjectType objectType, CancellationToken cancellationToken = default)

Parameters

objectType XPObjectType

An XPObjectType object specifying a valid persistent type.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Returns

Task

A Task that creates an XPObjectType record.

GetObjectsByKeyAsync(Session, ObjectsByKeyQuery[], CancellationToken)

Retrieves object data from a session asynchronously, according to specified query parameters.

Task<ICollection[]> GetObjectsByKeyAsync(Session session, ObjectsByKeyQuery[] queries, CancellationToken cancellationToken = default)

Parameters

session Session

A Session that is used to load persistent objects.

queries ObjectsByKeyQuery[]

An array of ObjectsQuery objects that specifies queries executed to retrieve persistent objects.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Returns

Task<ICollection[]>

A Task that returns an array of object collections. These object collections match specified query parameters.

LoadCollectionObjectsAsync(Session, XPMemberInfo, object, CancellationToken)

When implemented by a class, asynchronously loads a collection property using specified settings.

Task<object[]> LoadCollectionObjectsAsync(Session session, XPMemberInfo refProperty, object ownerObject, CancellationToken cancellationToken = default)

Parameters

session Session

A Session that is used to asynchronously load collection objects.

refProperty XPMemberInfo

The ownerObject‘s property that references a collection property.

ownerObject object

The object that owns the collection property.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Returns

Task<object[]>

A Task<TResult> that returns an array of collection objects.

LoadDelayedPropertiesAsync(Session, IList, XPMemberInfo, CancellationToken)

Asynchronously loads data from a session to an object’s specific properties marked for delayed loading.

Task<ObjectDictionary<object>> LoadDelayedPropertiesAsync(Session session, IList objects, XPMemberInfo property, CancellationToken cancellationToken = default)

Parameters

session Session

A Session that is used to retrieve data for delayed properties.

objects IList

A list of persistent objects that contain the delayed property specified by the property.

property XPMemberInfo

An XPMemberInfo object specifying a delayed property that accepts the data the LoadDelayedPropertiesAsync method loads.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Returns

Task<ObjectDictionary<object>>

A Task that returns an array of loaded property values.

LoadDelayedPropertiesAsync(Session, object, MemberPathCollection, CancellationToken)

Asynchronously loads data from a session to an object’s specific properties marked for delayed loading.

Task<object[]> LoadDelayedPropertiesAsync(Session session, object theObject, MemberPathCollection props, CancellationToken cancellationToken = default)

Parameters

session Session

A Session that is used to retrieve data for delayed properties.

theObject object

A persistent object that contains delayed properties specified by the props.

props MemberPathCollection

A MemberPathCollection object that specifies member paths for delayed properties where the LoadDelayedPropertiesAsync method loads data from a session.

cancellationToken CancellationToken

A CancellationToken object that delivers cancellation notice to the running operation.

Returns

Task<object[]>

A Task that returns an array of loaded property values.

LoadObjectsAsync(Session, ObjectsQuery[], CancellationToken)

Loads persistent objects asynchronously, according to specified query parameters.

Task<ICollection[]> LoadObjectsAsync(Session session, ObjectsQuery[] queries, CancellationToken cancellationToken = default)

Parameters

session Session

A Session that is used to load persistent objects.

queries ObjectsQuery[]

An array of ObjectsQuery objects that specifies queries executed to retrieve persistent objects.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Returns

Task<ICollection[]>

A Task that returns an array of object collections. These object collections match specified query parameters.

SelectDataAsync(Session, ObjectsQuery, CriteriaOperatorCollection, CriteriaOperatorCollection, CriteriaOperator, CancellationToken)

Retrieves object data from a session asynchronously, according to specified query parameters.

Task<List<object[]>> SelectDataAsync(Session session, ObjectsQuery query, CriteriaOperatorCollection properties, CriteriaOperatorCollection groupProperties, CriteriaOperator groupCriteria, CancellationToken cancellationToken = default)

Parameters

session Session

A Session that is used to retrieve persistent objects.

query ObjectsQuery

An array of ObjectsQuery objects that specifies queries executed to select data.

properties CriteriaOperatorCollection

A DevExpress.Data.Filtering.CriteriaOperatorCollection object which specifies object properties to be retrieved.

groupProperties CriteriaOperatorCollection

A DevExpress.Data.Filtering.CriteriaOperatorCollection object which specifies the grouping properties.

groupCriteria CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator descendant which specifies the grouping criteria for the retrieved objects.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Returns

Task<List<object[]>>

A Task that returns a list of object arrays. These object arrays match specified query parameters.

UpdateSchemaAsync(CancellationToken, bool, params XPClassInfo[])

When implemented by a class, asynchronously performs object layer specific operations that are required to update a data store’s schema according to the class descriptions of the specified types.

Task<UpdateSchemaResult> UpdateSchemaAsync(CancellationToken cancellationToken, bool doNotCreateIfFirstTableNotExist, params XPClassInfo[] types)

Parameters

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

doNotCreateIfFirstTableNotExist bool

true if the schema should not be created when the table that corresponds to the first item in the types array doesn’t exist in the data store; otherwise, false.

types XPClassInfo[]

An array of XPClassInfo objects specifying the types of objects for which schema should be created in the data store.

Returns

Task<UpdateSchemaResult>

A Task<TResult> that returns an DevExpress.Xpo.DB.UpdateSchemaResult value that specifies the result of the update operation.