Class TaskExtensions
- Namespace
- Cuemon.Extensions.Threading.Tasks
- Assembly
- Cuemon.Extensions.Threading.dll
Extension methods for the Task class.
public static class TaskExtensions
- Inheritance
-
TaskExtensions
Methods
ContinueWithCapturedContext(Task)
Configures an awaiter to marshal the continuation back to the captured synchronization context.
public static ConfiguredTaskAwaitable ContinueWithCapturedContext(this Task task)
Parameters
Returns
- ConfiguredTaskAwaitable
An object used to await this task.
ContinueWithCapturedContext<TResult>(Task<TResult>)
Configures an awaiter to marshal the continuation back to the captured synchronization context.
public static ConfiguredTaskAwaitable<TResult> ContinueWithCapturedContext<TResult>(this Task<TResult> task)
Parameters
Returns
- ConfiguredTaskAwaitable<TResult>
An object used to await this task.
Type Parameters
TResult
The type of the result produced by this Task<TResult>.
ContinueWithSuppressedContext(Task)
Configures an awaiter to suppress capturing a synchronization context back to the continuation.
public static ConfiguredTaskAwaitable ContinueWithSuppressedContext(this Task task)
Parameters
Returns
- ConfiguredTaskAwaitable
An object used to await this task.
ContinueWithSuppressedContext<TResult>(Task<TResult>)
Configures an awaiter to suppress capturing a synchronization context back to the continuation.
public static ConfiguredTaskAwaitable<TResult> ContinueWithSuppressedContext<TResult>(this Task<TResult> task)
Parameters
Returns
- ConfiguredTaskAwaitable<TResult>
An object used to await this task.
Type Parameters
TResult
The type of the result produced by this Task<TResult>.