AsyncRelayCommand Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AsyncRelayCommand(Func<CancellationToken,Task>) |
Initializes a new instance of the AsyncRelayCommand class that can always execute. |
AsyncRelayCommand(Func<Task>) |
Initializes a new instance of the AsyncRelayCommand class that can always execute. |
AsyncRelayCommand(Func<CancellationToken,Task>, Func<Boolean>) |
Initializes a new instance of the AsyncRelayCommand class. |
AsyncRelayCommand(Func<Task>, Func<Boolean>) |
Initializes a new instance of the AsyncRelayCommand class. |
AsyncRelayCommand(Func<CancellationToken,Task>)
Initializes a new instance of the AsyncRelayCommand class that can always execute.
public AsyncRelayCommand (Func<System.Threading.CancellationToken,System.Threading.Tasks.Task> cancelableExecute);
new CommunityToolkit.Mvvm.Input.AsyncRelayCommand : Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> -> CommunityToolkit.Mvvm.Input.AsyncRelayCommand
Public Sub New (cancelableExecute As Func(Of CancellationToken, Task))
Parameters
- cancelableExecute
- Func<CancellationToken,Task>
The cancelable execution logic.
Applies to
AsyncRelayCommand(Func<Task>)
Initializes a new instance of the AsyncRelayCommand class that can always execute.
public AsyncRelayCommand (Func<System.Threading.Tasks.Task> execute);
new CommunityToolkit.Mvvm.Input.AsyncRelayCommand : Func<System.Threading.Tasks.Task> -> CommunityToolkit.Mvvm.Input.AsyncRelayCommand
Public Sub New (execute As Func(Of Task))
Parameters
Applies to
AsyncRelayCommand(Func<CancellationToken,Task>, Func<Boolean>)
Initializes a new instance of the AsyncRelayCommand class.
public AsyncRelayCommand (Func<System.Threading.CancellationToken,System.Threading.Tasks.Task> cancelableExecute, Func<bool> canExecute);
new CommunityToolkit.Mvvm.Input.AsyncRelayCommand : Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> * Func<bool> -> CommunityToolkit.Mvvm.Input.AsyncRelayCommand
Public Sub New (cancelableExecute As Func(Of CancellationToken, Task), canExecute As Func(Of Boolean))
Parameters
- cancelableExecute
- Func<CancellationToken,Task>
The cancelable execution logic.
Applies to
AsyncRelayCommand(Func<Task>, Func<Boolean>)
Initializes a new instance of the AsyncRelayCommand class.
public AsyncRelayCommand (Func<System.Threading.Tasks.Task> execute, Func<bool> canExecute);
new CommunityToolkit.Mvvm.Input.AsyncRelayCommand : Func<System.Threading.Tasks.Task> * Func<bool> -> CommunityToolkit.Mvvm.Input.AsyncRelayCommand
Public Sub New (execute As Func(Of Task), canExecute As Func(Of Boolean))