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
IAsyncRelayCommandThe input IAsyncRelayCommand instance to create a cancellation command for.
Returns
Remarks
The returned instance is not guaranteed to be unique across multiple invocations with the same arguments.
Exceptions
- ArgumentNullException
Thrown if
command
is null.