Programming paradigm, using Task<T>
objects
async
keyword is used to declare an asynchronous function, which runs alongside the callerTask
, Task<T>
or void
(async event handler, I guess background work where you don't need a response)await
ing some data to return back)await
ed data is ready, resume the async function and compute/set the result in its Task, marking it completedawait
unwraps a Task<T>
object, while giving control back to the callerawait
an async
operation that returns a Task<T>
await
an operation which was started on a background thread with Task.Run
Task.Run
takes a Func<Task>
Func<TResult>
is just a lambda (in this case it can be used as a closure)delegate
keyword can be used to declare a type (class?) which can point to a functionFunc<bool> methodCall = a.mymethod;
is an example of defining a delegate without the delegate
keyword