Interface IAsyncRelayCommand
An interface expanding IRelayCommand to support asynchronous operations.
Inherited Members
Namespace: Unity.AppUI.MVVM
Syntax
public interface IAsyncRelayCommand : IRelayCommand, ICommand, INotifyPropertyChanged
Properties
canBeCancelled
Gets a value indicating whether a running operation for this command can currently be canceled.
Declaration
bool canBeCancelled { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
The exact sequence of events that types implementing this interface should raise is as follows:
executionTask
Gets the last scheduled Task, if available. This property notifies a change when the Task completes.
Declaration
Task executionTask { get; }
Property Value
Type | Description |
---|---|
Task |
isCancellationRequested
Gets a value indicating whether a running operation for this command has been cancelled.
Declaration
bool isCancellationRequested { get; }
Property Value
Type | Description |
---|---|
Boolean |
isRunning
Gets a value indicating whether an operation for this command is currently running.
Declaration
bool isRunning { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Cancel()
Attempts to cancel the currently running operation for this command.
Declaration
void Cancel()
ExecuteAsync(Object)
Executes the command asynchronously.
Declaration
Task ExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
Object | parameter | The input parameter. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |