Constructor AsyncRelayCommand
AsyncRelayCommand(Func<T?, Task>)
Initializes a new instance of the AsyncRelayCommand<T> class.
Declaration
public AsyncRelayCommand(Func<T?, Task> execute)
Parameters
Type | Name | Description |
---|---|---|
Func<T, Task> | execute | The Func<T, TResult> to invoke when the command is executed. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
AsyncRelayCommand(Func<T?, Task>, AsyncRelayCommandOptions)
Initializes a new instance of the AsyncRelayCommand<T> class.
Declaration
public AsyncRelayCommand(Func<T?, Task> execute, AsyncRelayCommandOptions options)
Parameters
Type | Name | Description |
---|---|---|
Func<T, Task> | execute | The Func<T, TResult> to invoke when the command is executed. |
AsyncRelayCommandOptions | options | The AsyncRelayCommandOptions to use when executing the command. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
AsyncRelayCommand(Func<T?, CancellationToken, Task>)
Initializes a new instance of the AsyncRelayCommand<T> class.
Declaration
public AsyncRelayCommand(Func<T?, CancellationToken, Task> cancellableExecute)
Parameters
Type | Name | Description |
---|---|---|
Func<T, CancellationToken, Task> | cancellableExecute | The Func<T1, T2, TResult> to invoke when the command is executed. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
AsyncRelayCommand(Func<T?, CancellationToken, Task>, AsyncRelayCommandOptions)
Initializes a new instance of the AsyncRelayCommand<T> class.
Declaration
public AsyncRelayCommand(Func<T?, CancellationToken, Task> cancellableExecute, AsyncRelayCommandOptions options)
Parameters
Type | Name | Description |
---|---|---|
Func<T, CancellationToken, Task> | cancellableExecute | The Func<T1, T2, TResult> to invoke when the command is executed. |
AsyncRelayCommandOptions | options | The AsyncRelayCommandOptions to use when executing the command. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
AsyncRelayCommand(Func<T?, Task>, Predicate<T?>)
Initializes a new instance of the AsyncRelayCommand<T> class.
Declaration
public AsyncRelayCommand(Func<T?, Task> execute, Predicate<T?> canExecute)
Parameters
Type | Name | Description |
---|---|---|
Func<T, Task> | execute | The Func<T, TResult> to invoke when the command is executed. |
Predicate<T> | canExecute | The Predicate<T> to invoke to determine whether the command can execute. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
AsyncRelayCommand(Func<T?, Task>, Predicate<T?>, AsyncRelayCommandOptions)
Initializes a new instance of the AsyncRelayCommand<T> class.
Declaration
public AsyncRelayCommand(Func<T?, Task> execute, Predicate<T?> canExecute, AsyncRelayCommandOptions options)
Parameters
Type | Name | Description |
---|---|---|
Func<T, Task> | execute | The Func<T1, T2, TResult> to invoke when the command is executed. |
Predicate<T> | canExecute | The Predicate<T> to invoke to determine whether the command can execute. |
AsyncRelayCommandOptions | options | The AsyncRelayCommandOptions to use when executing the command. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
AsyncRelayCommand(Func<T?, CancellationToken, Task>, Predicate<T?>)
Initializes a new instance of the AsyncRelayCommand<T> class.
Declaration
public AsyncRelayCommand(Func<T?, CancellationToken, Task> cancellableExecute, Predicate<T?> canExecute)
Parameters
Type | Name | Description |
---|---|---|
Func<T, CancellationToken, Task> | cancellableExecute | The Func<T1, T2, TResult> to invoke when the command is executed. |
Predicate<T> | canExecute | The Predicate<T> to invoke to determine whether the command can execute. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
AsyncRelayCommand(Func<T?, CancellationToken, Task>, Predicate<T?>, AsyncRelayCommandOptions)
Initializes a new instance of the AsyncRelayCommand<T> class.
Declaration
public AsyncRelayCommand(Func<T?, CancellationToken, Task> cancellableExecute, Predicate<T?> canExecute, AsyncRelayCommandOptions options)
Parameters
Type | Name | Description |
---|---|---|
Func<T, CancellationToken, Task> | cancellableExecute | The Func<T1, T2, TResult> to invoke when the command is executed. |
Predicate<T> | canExecute | The Predicate<T> to invoke to determine whether the command can execute. |
AsyncRelayCommandOptions | options | The AsyncRelayCommandOptions to use when executing the command. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|