Skip to main content

AsyncCommand(Func<CancellationToken, Task>, Func<Boolean>, Boolean) Constructor

Initializes a new instance of the AsyncCommand class with specified settings.

Namespace: DevExpress.Mvvm

Assembly: DevExpress.WinUI.Mvvm.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

public AsyncCommand(
    Func<CancellationToken, Task> execute,
    Func<bool> canExecute = null,
    bool allowMultipleExecution = false
)

Parameters

Name Type Description
execute Func<CancellationToken, Task>

The method that is called when the specified command is invoked.

Optional Parameters

Name Type Default Description
canExecute Func<Boolean> null

true if this command can be executed; otherwise, false.

allowMultipleExecution Boolean False

true to allow the command to be invoked simultaneously; otherwise, false.

See Also