Show / Hide Table of Contents

Class AsyncDelegateCommand<T>

A that exposes the task in its asynchronous delegates for ExecuteAsync().

Inheritance
System.Object
AsyncDelegateCommand<T>
Namespace: Phoenix.Views
Assembly: Phoenix.Abstractions.Views.dll
Syntax
public class AsyncDelegateCommand<T> : DelegateCommand<T>
Type Parameters
Name Description
T

Parameter type.

Constructors

View Source

AsyncDelegateCommand(Func<T, Task>)

Creates a new instance of AsyncDelegateCommand with the System.Func<T, TResult> to invoke on execution.

Declaration
public AsyncDelegateCommand(Func<T, Task> executeMethod)
Parameters
Type Name Description
System.Func<T, System.Threading.Tasks.Task> executeMethod

The System.Func<T, TResult> to invoke when System.Windows.Input.ICommand.Execute(System.Object) is called.

View Source

AsyncDelegateCommand(Func<T, Task>, Func<T, Boolean>)

Creates a new instance of AsyncDelegateCommand with the System.Func<T, TResult> to invoke on execution and a Func to query for determining if the command can execute.

Declaration
public AsyncDelegateCommand(Func<T, Task> executeMethod, Func<T, bool> canExecuteMethod)
Parameters
Type Name Description
System.Func<T, System.Threading.Tasks.Task> executeMethod

The System.Func<T, TResult> to invoke when System.Windows.Input.ICommand.Execute(System.Object) is called.

System.Func<T, System.Boolean> canExecuteMethod

The System.Func<T, TResult> to invoke when System.Windows.Input.ICommand.CanExecute(System.Object) is called

Methods

View Source

ExecuteAsync(T)

Executes the command asyncronously.

Declaration
public Task ExecuteAsync(T parameter)
Parameters
Type Name Description
T parameter

The parameter for the command.

Returns
Type Description
System.Threading.Tasks.Task

awaitable task

  • View Source
In This Article
Back to top Generated by DocFX