Struct EvergineConfiguredAwaiter
Provides an await-able object that allows for configured awaits on Task.
Implements
Inherited Members
Namespace: Evergine.Framework.Threading
Assembly: Evergine.Framework.dll
Syntax
public struct EvergineConfiguredAwaiter : INotifyCompletion
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 user rather than use directly 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 user rather than use directly in code.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | The |
| NullReferenceException | The awaiter was not properly initialized. |