Table of Contents

CloudOperation<TError>

class in Coherence.Cloud

Represents an asynchronous operation used to communicate with coherence Cloud.

Type Parameters

TError

Type of object returned if the operation fails.

Remarks

Async methods can await to wait until the operation finishes.

Coroutines can yield to wait until the operation finishes.

Constructors
CloudOperation(Task)
CloudOperation(Task, CancellationToken)
Fields
task
Properties
Error
HasFailed

Gets whether the operation has failed. If HasFailed is true, then Error will be non-null.

IsCanceled

Gets whether this operation has completed execution due to being canceled.

IsCompleted

Gets whether the operation has completed. true if the operation completed successfully, failed or was canceled; otherwise, false. or was

IsCompletedSuccessfully

Gets whether the operation has completed successfully.

keepWaiting
Methods
ContinueWith(Action, TaskContinuationOptions)

Specify an action to perform after the operation has completed (IsCompleted is true.

GetAwaiter()

Gets an object that can be used to await for this operation to complete. Awaiting the result of this method never causes an exception to be thrown. To handle errors you can either:

  1. Check if HasFailed is true and then examine the Error property for more details about what went wrong.
  2. Use the OnFail(Action<TError>) method to specify an action to perform if the operation fails.
OnFail(Action<TError>)

Specify an action to perform if the operation fails (HasFailed is true.

OnSuccess(Action)

Specify an action to perform if the operation completes successfully (IsCompletedSuccessfully is true.

ToString()
Operators
implicit operator Exception(CloudOperation<TError>)
implicit operator Task(CloudOperation<TError>)