Class AsyncRelayCommand<T>
A generic command that provides a more specific version of AsyncRelayCommand.
Implements
Inherited Members
Namespace: Unity.AppUI.MVVM
Assembly: solution.dll
Syntax
public class AsyncRelayCommand<T> : IAsyncRelayCommand<T>, IAsyncRelayCommand, INotifyPropertyChanged, IRelayCommand<T>, IRelayCommand, ICommand
Type Parameters
| Name | Description |
|---|---|
| T | The type of parameter being passed as input to the callbacks. |
Constructors
Properties
| Name | Description |
|---|---|
| canBeCancelled | Gets a value indicating whether this AsyncRelayCommand<T> can be cancelled. |
| executionTask | Gets a value indicating whether this AsyncRelayCommand<T> is currently running. |
| isCancellationRequested | Gets a value indicating whether this AsyncRelayCommand<T> has been cancelled. |
| isRunning | Gets a value indicating whether this AsyncRelayCommand<T> is currently running. |
Methods
| Name | Description |
|---|---|
| CanExecute(object?) | Determines whether this AsyncRelayCommand<T> can execute in its current state. |
| CanExecute(T?) | Determines whether this AsyncRelayCommand<T> can execute in its current state. |
| Cancel() | Cancels the current execution of this AsyncRelayCommand<T>. |
| Execute(object) | Determines whether this AsyncRelayCommand<T> can execute in its current state. |
| Execute(T?) | Executes the AsyncRelayCommand<T> synchronously on the current thread. |
| ExecuteAsync(object?) | Gets a value indicating whether this AsyncRelayCommand<T> can be executed. |
| ExecuteAsync(T?) | Occurs when changes occur that affect whether the command should execute. |
| NotifyCanExecuteChanged() | Raises CanExecuteChanged. |
Events
| Name | Description |
|---|---|
| CanExecuteChanged | Event raised when the CanExecute(object?) property changes. |
| PropertyChanged | Event raised when the executionTask property changes. |