Class AsyncCommand
Inheritance
object
AsyncCommand
Implements
Namespace: PSPDFKit.Sdk.MVVM
Assembly: Sdk.dll
Syntax
public class AsyncCommand : ICommand
Constructors
| Edit this page View SourceAsyncCommand(Func<Task>)
Declaration
public AsyncCommand(Func<Task> execute)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Task> | execute |
AsyncCommand(Func<Task>, Func<bool>)
Declaration
public AsyncCommand(Func<Task> execute, Func<bool> canExecute)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Task> | execute | |
| Func<bool> | canExecute |
Methods
| Edit this page View SourceCanExecute(object)
Determines whether the command can execute in its current state.
Declaration
public bool CanExecute(object parameter)
Parameters
| Type | Name | Description |
|---|---|---|
| object | parameter | Data used by the command. If the command does not require data to be passed, this object can be set to null. |
Returns
| Type | Description |
|---|---|
| bool |
Execute(object)
Defines the method to be called when the command is invoked.
Declaration
public void Execute(object parameter)
Parameters
| Type | Name | Description |
|---|---|---|
| object | parameter | Data used by the command. If the command does not require data to be passed, this object can be set to null. |
NotifyCanExecuteChanged()
Declaration
public void NotifyCanExecuteChanged()
Events
| Edit this page View SourceCanExecuteChanged
Occurs when changes take place that affect whether or not the command should execute.
Declaration
public event EventHandler CanExecuteChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |