Edytuj

Udostępnij za pośrednictwem


AsyncRelayCommand Constructors

Definition

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

execute
Func<Task>

The execution logic.

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.

canExecute
Func<Boolean>

The execution status 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))

Parameters

execute
Func<Task>

The execution logic.

canExecute
Func<Boolean>

The execution status logic.

Applies to