Table of Contents

Class IAsyncRelayCommandExtensions

Namespace
CommunityToolkit.Mvvm.Input
Assembly
CommunityToolkit.Mvvm.dll

Extensions for the IAsyncRelayCommand type.

public static class IAsyncRelayCommandExtensions
Inheritance
IAsyncRelayCommandExtensions
Inherited Members

Methods

CreateCancelCommand(IAsyncRelayCommand)

Creates an ICommand instance that can be used to cancel execution on the input command. The returned command will also notify when it can be executed based on the state of the wrapped command.

public static ICommand CreateCancelCommand(this IAsyncRelayCommand command)

Parameters

command IAsyncRelayCommand

The input IAsyncRelayCommand instance to create a cancellation command for.

Returns

ICommand

An ICommand instance that can be used to monitor and signal cancellation for command.

Remarks

The returned instance is not guaranteed to be unique across multiple invocations with the same arguments.

Exceptions

ArgumentNullException

Thrown if command is null.