Skip to main content

AsyncCommand(Func<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<Task> execute,
    Func<bool> canExecute = null,
    bool allowMultipleExecution = false
)

Parameters

Name Type Description
execute Func<Task>

The Task 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 multiple threads to execute the initializer delegate; otherwise, false.

See Also