Open sandboxFocus

Interface IAsyncCommand

Represents an ICommand that executes asynchronously, providing properties to monitor execution state and methods to cancel running executions.

Namespace: Metalama.Patterns.Wpf
Assembly: Metalama.Patterns.Wpf.dll
Syntax
public interface IAsyncCommand : ICommand, INotifyPropertyChanged
Remarks

This interface extends both ICommand and INotifyPropertyChanged to enable data binding to command state properties in WPF applications.

Properties

Name Description
CanCancel

Gets a value indicating whether the Cancel() command can be called.

ExecutionTask

Gets the Task of the last execution.

IsCancellationRequested

Gets a value indicating whether the Cancel() has been called for any pending command execution.

IsRunning

Gets a value indicating whether any command is currently executing.

Methods

Name Description
Cancel()

Cancels all pending executions of the current command.

Extension Methods

See Also