Breaking Change T844377
Visible to All Users

The IObjectLayerAsync interface has been changed

What Changed

We added the following members to the IObjectLayerAsync interface: the CanLoadCollectionObjectsAsynchronously property and the LoadCollectionObjectsAsync method.

Reasons for Change

New members help us add the Task-based version of the XPBaseCollection.Load method. It is useful in scenarios where you want to asynchronously load XPCollection and then assign it to a data-bound control.

C#
XPCollection<Customer> customers = new XPCollection<Customer>(session); await customers.LoadAsync(); gridControl.DataSource = customers;
Visual Basic
Dim customers As New XPCollection(Of Customer)(session) Await customers.LoadAsync() gridControl.DataSource = customers

Impact on Existing Apps

This change will not affect the majority of XPO users.

Advanced XPO developers who created a custom Object Access Layer and implemented the IObjectLayerAsync interface, can extend their implementation as follows:

  • The CanLoadCollectionObjectsAsynchronously property should return false if a custom Object Access Layer does not support the LoadCollectionObjectsAsync method.
  • The LoadCollectionObjectsAsync method should return a task that represents asynchronous loading of collection properties. The task result must contain an array of collection objects.

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.