Class TaskExtensions
Provides methods for configuring Task continuation.
Namespace: Evergine.Framework.Threading
Assembly: Evergine.Framework.dll
Syntax
public static class TaskExtensions
Methods
ConfigureEvergineAwait(Task, EvergineTaskContinueOn)
Configures the awaiter used to await this Task.
Declaration
public static EvergineConfiguredAwaiter ConfigureEvergineAwait(this Task task, EvergineTaskContinueOn continueOn = EvergineTaskContinueOn.Default)
Parameters
Type | Name | Description |
---|---|---|
Task | task | The task to be awaited. |
EvergineTaskContinueOn | continueOn | Specifies the desired behavior to await this task. |
Returns
Type | Description |
---|---|
EvergineConfiguredAwaiter | The instance to be awaited. |
ConfigureEvergineAwait<T>(Task<T>, EvergineTaskContinueOn)
Configures the awaiter used to await this Task<TResult>.
Declaration
public static EvergineConfiguredAwaiter<T> ConfigureEvergineAwait<T>(this Task<T> task, EvergineTaskContinueOn continueOn = EvergineTaskContinueOn.Default)
Parameters
Type | Name | Description |
---|---|---|
Task<T> | task | The task to be awaited. |
EvergineTaskContinueOn | continueOn | Specifies whether to continue on the current synchronization context. |
Returns
Type | Description |
---|---|
EvergineConfiguredAwaiter<T> | The instance to be awaited. |
Type Parameters
Name | Description |
---|---|
T | The task result type. |