Delegate AsyncAction<T>
Encapsulates an asynchronous method that has one parameter and does not return a value.
Equivalent to Func<T, Task>.
Namespace: Recore
Assembly: Recore.dll
Syntax
public delegate Task AsyncAction<in T>(T obj);
Parameters
| Type | Name | Description |
|---|---|---|
| T | obj |
Returns
| Type | Description |
|---|---|
| Task |
Type Parameters
| Name | Description |
|---|---|
| T |
Examples
Say you have a method with the signature
Task DoThing(int x, string s, Func<int, Task> thing)
You can refactor this to
Task DoThing(int x, string s, AsyncAction<int> thing)