Breaking Change T817657
Visible to All Users

The IDispatcherService interface has been changed

The DevExpress.Mvvm.IDispatcherService interface has been changed. Previously it had a single void method for executing actions.

C#
public interface IDispatcherService { void BeginInvoke(Action action); }
Visual Basic
Public Interface IDispatcherService Sub BeginInvoke(ByVal action As Action) End Interface

We have wrapped the BeginInvoke method in Task and added an Invoke void method.

C#
public interface IDispatcherService { Task BeginInvoke(Action action); void Invoke(Action action); }
Visual Basic
Public Interface IDispatcherService Function BeginInvoke(ByVal action As Action) As Task Sub Invoke(ByVal action As Action) End Interface

This change allows you to use the DispatcherService to perform actions in a ViewModel asynchronously using the await operator. See the example below:

C#
using DevExpress.Mvvm; await DispatcherService.BeginInvoke(() => { // action });
Visual Basic
Imports DevExpress.Mvvm Await DispatcherService.BeginInvoke(Sub() '... End Sub)

Use the DispatcherService.Invoke void method to execute actions synchronously.

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.