Struct EvergineConfiguredAwaiter
Provides an awaitable object that allows for configured awaits on Task.
Namespace: Evergine.Framework.Threading
Assembly: Evergine.Framework.dll
Syntax
public struct EvergineConfiguredAwaiter
Remarks
This type is intended for compiler use only.
Constructors
EvergineConfiguredAwaiter(Task, EvergineTaskContinueOn)
Initializes a new instance of the EvergineConfiguredAwaiter struct.
Declaration
public EvergineConfiguredAwaiter(Task task, EvergineTaskContinueOn continueOn)
Parameters
Type | Name | Description |
---|---|---|
Task | task | The awaitable Task. |
EvergineTaskContinueOn | continueOn | The desired continuation behavior. |
Properties
IsCompleted
Gets a value indicating whether the task being awaited is completed.
Declaration
public bool IsCompleted { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This property is intended for compiler use rather than for direct use in code.
Exceptions
Type | Condition |
---|---|
NullReferenceException | The awaiter was not properly initialized. |
Methods
GetAwaiter()
Gets an awaiter for this awaitable.
Declaration
public EvergineConfiguredAwaiter GetAwaiter()
Returns
Type | Description |
---|---|
EvergineConfiguredAwaiter | The awaiter. |
GetResult()
Ends the await on the completed Task.
Declaration
public void GetResult()
Exceptions
Type | Condition |
---|---|
NullReferenceException | The awaiter was not properly initialized. |
TaskCanceledException | The task was canceled. |
Exception | The task completed in a faulted state. |
OnCompleted(Action)
Schedules the continuation onto the Task associated with this TaskAwaiter.
Declaration
public void OnCompleted(Action continuation)
Parameters
Type | Name | Description |
---|---|---|
Action | continuation | The action to invoke when the await operation completes. |
Remarks
This method is intended for compiler usage rather than direct use in code.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
NullReferenceException | The awaiter was not properly initialized. |