Skip to content
This repository was archived by the owner on Aug 27, 2020. It is now read-only.

IAsyncDelegateCommand

Mark Smith edited this page Sep 2, 2016 · 2 revisions

IAsyncDelegateCommand

This interface abstracts the asynchronous ICommand approach and provides access to two additional methods:

Methods

  • ExecuteAsync : the async (Task based) version of ICommand.Execute.
  • RaiseCanExecuteChanged : inherited from the base interface [IDelegateCommand](IDelegateCommand) which provides access to the CanExecuteChanged` event.
/// <summary>
/// Extension of ICommand which exposes a raise execute handler and async support.
/// </summary>
public interface IAsyncDelegateCommand : IAsyncDelegateCommand
{
    Task ExecuteAsync (object parameter);
}

/// <summary>
/// Extension of ICommand which exposes a raise execute handler.
/// </summary>
public interface IAsyncDelegateCommand<T> : IAsyncDelegateCommand<T>
{
    Task ExecuteAsync (T parameter);
}