Open sandboxFocus

Class BaseAsyncDelegateCommand

A base class for delegate-based async commands.

Namespace: Metalama.Patterns.Wpf
Assembly: Metalama.Patterns.Wpf.dll
Syntax
public abstract class BaseAsyncDelegateCommand : BaseDelegateCommand, IAsyncCommand, ICommand, INotifyPropertyChanged

Properties

Name Description
CanCancel

Gets a value indicating whether the current command can be cancelled. Returns true if the command supports cancellation (e.g. has a parameter of type CancellationToken) and is currently running.

ExecutionTask

Gets the Task representing the last execution of the command.

IsCancellationRequested

Gets a value indicating whether the Cancel() method was called for the last task.

IsRunning

Gets a value indicating whether the last execution task (i.e., ExecutionTask) is still running.

Methods

Name Description
Cancel()

Cancels all currently pending executions.

Events

Name Description
Executed

Event raised when the Execute(T) method is called.

PropertyChanged

Extension Methods