API reference

Awaiter Struct

Extends INotifyCompletion
Definition of an awaiter that satisfies the await contract.
This allows an OVRTask<T> to be awaited using the await keyword. Typically, you should not use this struct; instead, it is used by the compiler by automatically calling the GetAwaiter method when using the await keyword.

Properties

bool IsCompleted[Get]
Whether the task has completed.
When True the asynchronous operation associated with the OVRTask<TResult> that created this Awaiter (see OVRTask<TResult>.GetAwaiter) is complete.Typically, you would not call this directly. This is queried by a compiler-generated state machine to support async / await.

Member Functions

void INotifyCompletion. OnCompleted
( Action continuation )
Provides the Awaiter with a method to call when the task completes.
Do not call this directly. It is called by a compiler-generated state machine when using the await keyword.
Parameters
continuation
The continuation to invoke when the task is complete.
TResult GetResult ( )
Gets the result of the asynchronous operation.
Typically, you should not call this directly. Use OVRTask<TResult>.GetResult() instead.
Returns
The result of the asynchronous operation.
Exceptions
InvalidOperationException
Thrown if there is no result available.