AsyncCommand(Func<T, CancellationToken, Task>, Func<T, Boolean>, Boolean) Constructor
In This Article
Initializes a new instance of the AsyncCommand<T> class with specified settings.
Namespace: DevExpress.Mvvm
Assembly: DevExpress.WinUI.Mvvm.v23.2.dll
NuGet Package: DevExpress.WinUI
#Declaration
public AsyncCommand(
Func<T, CancellationToken, Task> execute,
Func<T, bool> canExecute = null,
bool allowMultipleExecution = false
)
#Parameters
Name | Type | Description |
---|---|---|
execute | Func<T, Cancellation |
The execute delegate. The delegate parameter allows you to implement cancellation logic. |
#Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
can |
Func<T, Boolean> | null | A delegate that determines whether a command can be executed. |
allow |
Boolean | False |
|
See Also