CoherenceTask<TResult>
Represents an asynchronous operation with a result of type
Type Parameters
TResult
Type of object returned if the operation succeeds.
Remarks
Async methods can use await to wait until the operation finishes.
Coroutines can use yield to wait until the operation finishes.
ContinueWith(Action, TaskContinuationOptions) can also be used to perform an action after the operation has completed.
Coherence tasks do not throw exceptions if they are cancelled; you can determine if an operation has been canceled using IsCanceled
Properties
Result | The result of the operation, if it has completed successfully; otherwise, the default value of TResult. |
Methods
ContinueWith(Action, TaskContinuationOptions) | Specify an action to perform after the operation has completed (IsCompleted becomes true. |
GetAwaiter() | Gets an object that can be used to await for this operation to complete. |
OnSuccess(Action<TResult>) | Specify an action to perform if the operation completes successfully (IsCompletedSuccessfully becomes true. |
ToString() |
Operators
implicit operator TResult(CoherenceTask<TResult>) |